summaryrefslogtreecommitdiff
path: root/src/timer_wrap.cc
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-04-12 16:03:47 -0700
committerisaacs <i@izs.me>2012-04-17 13:14:54 -0700
commita26bee8fa16bcbdaafdee516288c6f59a43376f5 (patch)
tree33bdf31ce9891151c4d77ef785b86efb843b3d9e /src/timer_wrap.cc
parentdb45b2ca02dc23278a477625a8698ce136eb8807 (diff)
downloadnode-a26bee8fa16bcbdaafdee516288c6f59a43376f5.tar.gz
MakeCallback: Consistent symbol usage
Diffstat (limited to 'src/timer_wrap.cc')
-rw-r--r--src/timer_wrap.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc
index 273f8265f..89ebf46bb 100644
--- a/src/timer_wrap.cc
+++ b/src/timer_wrap.cc
@@ -50,6 +50,7 @@ using v8::Context;
using v8::Arguments;
using v8::Integer;
+static Persistent<String> ontimeout_sym;
class TimerWrap : public HandleWrap {
public:
@@ -70,6 +71,8 @@ class TimerWrap : public HandleWrap {
NODE_SET_PROTOTYPE_METHOD(constructor, "getRepeat", GetRepeat);
NODE_SET_PROTOTYPE_METHOD(constructor, "again", Again);
+ ontimeout_sym = NODE_PSYMBOL("ontimeout");
+
target->Set(String::NewSymbol("Timer"), constructor->GetFunction());
}
@@ -200,7 +203,7 @@ class TimerWrap : public HandleWrap {
wrap->StateChange();
Local<Value> argv[1] = { Integer::New(status) };
- MakeCallback(wrap->object_, "ontimeout", 1, argv);
+ MakeCallback(wrap->object_, ontimeout_sym, ARRAY_SIZE(argv), argv);
}
uv_timer_t handle_;