From 742923c73d9197884fb3ad09ab511a3673b74869 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 9 Sep 2014 13:32:41 +0800 Subject: [PATCH] Remove unused constructor of Dictionary. --- native_mate/dictionary.cc | 11 ++--------- native_mate/dictionary.h | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) 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));