Should wrap WeakCallback with handle scope.

This commit is contained in:
Cheng Zhao 2013-04-26 21:28:41 +08:00
parent dded164052
commit d4d1230107

View file

@ -42,6 +42,8 @@ int IDWeakMap::GetNextID() {
void IDWeakMap::WeakCallback(v8::Isolate* isolate,
v8::Persistent<v8::Value> value,
void *data) {
v8::HandleScope scope;
IDWeakMap* obj = static_cast<IDWeakMap*>(data);
int key = value->ToObject()->GetHiddenValue(
v8::String::New("IDWeakMapKey"))->IntegerValue();