src: fix MakeCallback() handle leak
Create a new HandleScope before looking up the object context with v8::Object::CreationContext(), else we leak the Local<Context> into the current HandleScope. That's relatively harmless unless the HandleScope is long-lived and MakeCallback() is called a lot. In a scenario like that, we may end up leaking a lot of memory. What is unfortunate about this change is that we're trying hard to eradicate the node_isolate global. Longer term, we will probably have to change the MakeCallback() prototype to one that requires an explicit v8::Isolate* argument.
parent
1f2f3fa8
Please register or sign in to comment