Handle<Object> WrappedContext::WrapContext(Persistent<Context> context) { HandleScope scope; WrappedContext *t = new WrappedContext(context); Local<Object> wrappedContext = WrappedContext::NewInstance(); t->Wrap(wrappedContext); return scope.Close(wrappedContext); }
Handle<Value> WrappedContext::New(const Arguments& args) { HandleScope scope; WrappedContext *t = new WrappedContext(); t->Wrap(args.This()); return args.This(); }