From 2891790dbdc0f1ac0cb23c8dd2f284d78c78abdb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 23 Aug 2013 14:29:57 +0200 Subject: [PATCH] vm: remove unnecessary Persistent --- src/node_contextify.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index b2b7324..0f1b458 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -51,7 +51,6 @@ class ContextifyContext : ObjectWrap { private: Persistent sandbox_; Persistent proxy_global_; - static Persistent data_wrapper_tmpl; static Persistent data_wrapper_ctor; public: @@ -124,11 +123,7 @@ class ContextifyContext : ObjectWrap { Local function_template = FunctionTemplate::New(); function_template->InstanceTemplate()->SetInternalFieldCount(1); - data_wrapper_tmpl.Reset(node_isolate, function_template); - - Local lwrapper_tmpl = - PersistentToLocal(node_isolate, data_wrapper_tmpl); - data_wrapper_ctor.Reset(node_isolate, lwrapper_tmpl->GetFunction()); + data_wrapper_ctor.Reset(node_isolate, function_template->GetFunction()); js_tmpl.Reset(node_isolate, FunctionTemplate::New(New)); Local ljs_tmpl = PersistentToLocal(node_isolate, js_tmpl); @@ -487,7 +482,6 @@ class ContextifyScript : ObjectWrap { Persistent ContextifyContext::js_tmpl; -Persistent ContextifyContext::data_wrapper_tmpl; Persistent ContextifyContext::data_wrapper_ctor; Persistent ContextifyScript::script_tmpl; -- 2.7.4