Enable creating empty Dictionary directly.

This commit is contained in:
Cheng Zhao 2014-06-23 21:38:46 +08:00
parent 1884b9a235
commit 51a55810b9
2 changed files with 3 additions and 2 deletions

View file

@ -7,7 +7,8 @@
namespace mate {
Dictionary::Dictionary(v8::Isolate* isolate)
: isolate_(isolate) {
: isolate_(isolate),
object_(v8::Object::New()) {
}
Dictionary::Dictionary(v8::Isolate* isolate,

View file

@ -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<v8::Object> object);
~Dictionary();