Should wrap WeakCallback with handle scope.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 26 Apr 2013 13:28:41 +0000 (21:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 26 Apr 2013 13:28:41 +0000 (21:28 +0800)
common/api/atom_api_id_weak_map.cc

index 1680024..3b4d975 100644 (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();