mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Use InstanceTemplate() instead of PrototypeTemplate() for accessor methods
This fixes crash that used to happen when Eclipse debugging session hits the breakpoint that is set either in timer or connection callback.
This commit is contained in:
1 parent
490cac0d7e
commit
fbef11b679
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -112,12 +112,12 @@ void Connection::Initialize(v8::Handle<v8::Object> target) {
|
||||
#endif
|
||||
|
||||
// Getter for connection.readyState
|
||||
constructor_template->PrototypeTemplate()->SetAccessor(
|
||||
constructor_template->InstanceTemplate()->SetAccessor(
|
||||
ready_state_symbol,
|
||||
ReadyStateGetter);
|
||||
|
||||
// Getter for connection.readyState
|
||||
constructor_template->PrototypeTemplate()->SetAccessor(
|
||||
constructor_template->InstanceTemplate()->SetAccessor(
|
||||
fd_symbol,
|
||||
FDGetter);
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ Timer::Initialize (Handle<Object> target)
|
||||
NODE_SET_PROTOTYPE_METHOD(constructor_template, "start", Timer::Start);
|
||||
NODE_SET_PROTOTYPE_METHOD(constructor_template, "stop", Timer::Stop);
|
||||
|
||||
constructor_template->PrototypeTemplate()->SetAccessor(repeat_symbol,
|
||||
constructor_template->InstanceTemplate()->SetAccessor(repeat_symbol,
|
||||
RepeatGetter, RepeatSetter);
|
||||
|
||||
target->Set(String::NewSymbol("Timer"), constructor_template->GetFunction());
|
||||
|
||||
Reference in new issue
Block a user