diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-11-04 10:49:55 -0800 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-11-12 13:38:31 -0800 |
commit | d120d92bfef0b5012e76c636335fee80e9c1e4a9 (patch) | |
tree | 277864e238d78271c82b3e77c8f3e8c850c35bd9 /src/node_contextify.cc | |
parent | 6cea16f2c9ec0666708e924fa93c664ddb000b5c (diff) | |
download | node-d120d92bfef0b5012e76c636335fee80e9c1e4a9.tar.gz |
base-object: add BaseObject
BaseObject is a class that just handles the Persistent handle attached
to the class instance.
This also removed WeakObject. Reordering the inheritance chain helps
prevent unneeded calls on instances that don't call MakeCallback.
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r-- | src/node_contextify.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 508e32957..b3316f54d 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -22,12 +22,12 @@ #include "node.h" #include "node_internals.h" #include "node_watchdog.h" +#include "base-object.h" +#include "base-object-inl.h" #include "env.h" #include "env-inl.h" #include "util.h" #include "util-inl.h" -#include "weak-object.h" -#include "weak-object-inl.h" namespace node { @@ -381,7 +381,7 @@ class ContextifyContext { } }; -class ContextifyScript : public WeakObject { +class ContextifyScript : public BaseObject { private: Persistent<Script> script_; @@ -607,7 +607,8 @@ class ContextifyScript : public WeakObject { ContextifyScript(Environment* env, Local<Object> object) - : WeakObject(env, object) { + : BaseObject(env, object) { + MakeWeak<ContextifyScript>(this); } |