diff --git a/native_mate/dictionary.cc b/native_mate/dictionary.cc index 1504f683f0..88bdefb1f7 100644 --- a/native_mate/dictionary.cc +++ b/native_mate/dictionary.cc @@ -7,7 +7,8 @@ namespace mate { Dictionary::Dictionary(v8::Isolate* isolate) - : isolate_(isolate) { + : isolate_(isolate), + object_(v8::Object::New()) { } Dictionary::Dictionary(v8::Isolate* isolate, diff --git a/native_mate/dictionary.h b/native_mate/dictionary.h index 563916e459..333bae0f7a 100644 --- a/native_mate/dictionary.h +++ b/native_mate/dictionary.h @@ -24,7 +24,7 @@ namespace mate { // class Dictionary { public: - explicit Dictionary(v8::Isolate* isolate = NULL); + Dictionary(v8::Isolate* isolate = v8::Isolate::GetCurrent()); Dictionary(v8::Isolate* isolate, v8::Handle object); ~Dictionary();