@@ -78,7 +78,7 @@ AerospikeCommand::Callback(const int argc, Local<Value> argv[])
78
78
Local<Value>
79
79
AerospikeCommand::ErrorCallback ()
80
80
{
81
- Nan::HandleScope scope;
81
+ Nan::EscapableHandleScope scope;
82
82
83
83
if (err.code <= AEROSPIKE_ERR_CLIENT) {
84
84
as_v8_error (log , " Client error in %s command: %s [%d]" , cmd.c_str (), err.message , err.code );
@@ -87,29 +87,29 @@ AerospikeCommand::ErrorCallback()
87
87
}
88
88
89
89
Local<Value> args[] = { error_to_jsobject (&err, log ) };
90
- return Callback (1 , args);
90
+ return scope. Escape ( Callback (1 , args) );
91
91
}
92
92
93
93
Local<Value>
94
94
AerospikeCommand::ErrorCallback (as_error* error)
95
95
{
96
- Nan::HandleScope scope;
96
+ Nan::EscapableHandleScope scope;
97
97
98
98
as_error_copy (&err, error);
99
99
100
- return ErrorCallback ();
100
+ return scope. Escape ( ErrorCallback () );
101
101
}
102
102
103
103
Local<Value>
104
104
AerospikeCommand::ErrorCallback (as_status code, const char * func, const char * file,
105
105
uint32_t line, const char * fmt, ...)
106
106
{
107
- Nan::HandleScope scope;
107
+ Nan::EscapableHandleScope scope;
108
108
109
109
va_list args;
110
110
va_start (args, fmt);
111
111
as_error_setallv (&err, code, func, file, line, fmt, args);
112
112
va_end (args);
113
113
114
- return ErrorCallback ();
114
+ return scope. Escape ( ErrorCallback () );
115
115
}
0 commit comments