// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. #include "native_mate/dictionary.h" namespace mate { Dictionary::Dictionary() : isolate_(NULL) { } Dictionary::Dictionary(v8::Isolate* isolate, v8::Handle object) : isolate_(isolate), object_(object) { } Dictionary::~Dictionary() { } v8::Handle Dictionary::GetHandle() const { return object_; } v8::Handle Converter::ToV8(v8::Isolate* isolate, Dictionary val) { return val.GetHandle(); } bool Converter::FromV8(v8::Isolate* isolate, v8::Handle val, Dictionary* out) { if (!val->IsObject()) return false; *out = Dictionary(isolate, v8::Handle::Cast(val)); return true; } } // namespace mate