Commit f129ff39 by Marcin Cieslak

bridge operator() does not need escapable scope

The value is not returned, it is passed on
to another funcion.
parent 9a8f9056
...@@ -81,12 +81,12 @@ template <typename T, typename L> ...@@ -81,12 +81,12 @@ template <typename T, typename L>
T CallbackBridge<T, L>::operator()(std::vector<void*> argv) { T CallbackBridge<T, L>::operator()(std::vector<void*> argv) {
// argv.push_back(wrapper); // argv.push_back(wrapper);
if (this->is_sync) { if (this->is_sync) {
Nan::EscapableHandleScope scope; Nan::HandleScope scope;
std::vector<v8::Local<v8::Value>> argv_v8 = pre_process_args(argv); std::vector<v8::Local<v8::Value>> argv_v8 = pre_process_args(argv);
argv_v8.push_back(Nan::New(wrapper)); argv_v8.push_back(Nan::New(wrapper));
return this->post_process_return_value( return this->post_process_return_value(
scope.Escape(this->callback->Call(argv_v8.size(), &argv_v8[0])) this->callback->Call(argv_v8.size(), &argv_v8[0])
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment