1 // Copyright 2013 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gin/dictionary.h"
9 Dictionary::Dictionary(v8::Isolate* isolate)
13 Dictionary::Dictionary(v8::Isolate* isolate,
14 v8::Local<v8::Object> object)
19 Dictionary::Dictionary(const Dictionary& other) = default;
21 Dictionary::~Dictionary() = default;
23 Dictionary Dictionary::CreateEmpty(v8::Isolate* isolate) {
24 Dictionary dictionary(isolate);
25 dictionary.object_ = v8::Object::New(isolate);
29 v8::Local<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate,
34 bool Converter<Dictionary>::FromV8(v8::Isolate* isolate,
35 v8::Local<v8::Value> val,
39 *out = Dictionary(isolate, v8::Local<v8::Object>::Cast(val));