summaryrefslogtreecommitdiff
path: root/src/node_contextify.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-08-23 14:29:57 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-08-23 14:29:58 +0200
commit2891790dbdc0f1ac0cb23c8dd2f284d78c78abdb (patch)
tree511d04d93f482dbe1846ad148fa32df7a15afa89 /src/node_contextify.cc
parentbc28acdd029687d24004f69f98617c7e171ca173 (diff)
downloadnode-2891790dbdc0f1ac0cb23c8dd2f284d78c78abdb.tar.gz
vm: remove unnecessary Persistent<FunctionTemplate>
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r--src/node_contextify.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index b2b73240a..0f1b4588b 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -51,7 +51,6 @@ class ContextifyContext : ObjectWrap {
private:
Persistent<Object> sandbox_;
Persistent<Object> proxy_global_;
- static Persistent<FunctionTemplate> data_wrapper_tmpl;
static Persistent<Function> data_wrapper_ctor;
public:
@@ -124,11 +123,7 @@ class ContextifyContext : ObjectWrap {
Local<FunctionTemplate> function_template = FunctionTemplate::New();
function_template->InstanceTemplate()->SetInternalFieldCount(1);
- data_wrapper_tmpl.Reset(node_isolate, function_template);
-
- Local<FunctionTemplate> 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<FunctionTemplate> ljs_tmpl = PersistentToLocal(node_isolate, js_tmpl);
@@ -487,7 +482,6 @@ class ContextifyScript : ObjectWrap {
Persistent<FunctionTemplate> ContextifyContext::js_tmpl;
-Persistent<FunctionTemplate> ContextifyContext::data_wrapper_tmpl;
Persistent<Function> ContextifyContext::data_wrapper_ctor;
Persistent<FunctionTemplate> ContextifyScript::script_tmpl;