diff --git a/native_mate/dictionary.cc b/native_mate/dictionary.cc index 1a1750ff12e..168e5e75833 100644 --- a/native_mate/dictionary.cc +++ b/native_mate/dictionary.cc @@ -6,9 +6,8 @@ namespace mate { -Dictionary::Dictionary(v8::Isolate* isolate) - : isolate_(isolate), - object_(MATE_OBJECT_NEW(isolate)) { +Dictionary::Dictionary() + : isolate_(NULL) { } Dictionary::Dictionary(v8::Isolate* isolate, @@ -20,12 +19,6 @@ Dictionary::Dictionary(v8::Isolate* isolate, Dictionary::~Dictionary() { } -Dictionary Dictionary::CreateEmpty(v8::Isolate* isolate) { - Dictionary dictionary(isolate); - dictionary.object_ = MATE_OBJECT_NEW(isolate); - return dictionary; -} - v8::Handle Converter::ToV8(v8::Isolate* isolate, Dictionary val) { return val.object_; diff --git a/native_mate/dictionary.h b/native_mate/dictionary.h index 8c5dfeaae35..f901e7e27dc 100644 --- a/native_mate/dictionary.h +++ b/native_mate/dictionary.h @@ -24,12 +24,10 @@ namespace mate { // class Dictionary { public: - Dictionary(v8::Isolate* isolate = v8::Isolate::GetCurrent()); + Dictionary(); Dictionary(v8::Isolate* isolate, v8::Handle object); ~Dictionary(); - static Dictionary CreateEmpty(v8::Isolate* isolate); - template bool Get(const base::StringPiece& key, T* out) const { v8::Handle val = object_->Get(StringToV8(isolate_, key));