Small change that Context::New requires an isolate and returns Local
instead of Persistent.
HandleScope handle_scope(node_isolate);
// Create the one and only Context.
HandleScope handle_scope(node_isolate);
// Create the one and only Context.
- Persistent<Context> context = Context::New();
+ Local<Context> context = Context::New(node_isolate);
Context::Scope context_scope(context);
// Use original argv, as we're just copying values out of it.
Context::Scope context_scope(context);
// Use original argv, as we're just copying values out of it.
EmitExit(process_l);
RunAtExit();
EmitExit(process_l);
RunAtExit();
-
-#ifndef NDEBUG
- context.Dispose(node_isolate);
-#endif
WrappedContext::WrappedContext() : ObjectWrap() {
WrappedContext::WrappedContext() : ObjectWrap() {
- context_ = Context::New();
+ context_ = Persistent<Context>::New(node_isolate, Context::New(node_isolate));
// function. Here we grab a temporary handle to the new context, assign it
// to a local handle, and then dispose the persistent handle. This ensures
// that when this function exits the context will be disposed.
// function. Here we grab a temporary handle to the new context, assign it
// to a local handle, and then dispose the persistent handle. This ensures
// that when this function exits the context will be disposed.
- Persistent<Context> tmp = Context::New();
- context = Local<Context>::New(node_isolate, tmp);
- tmp.Dispose(node_isolate);
+ context = Context::New(node_isolate);
} else if (context_flag == userContext) {
// Use the passed in context
} else if (context_flag == userContext) {
// Use the passed in context