3ae3233e65
* refactor: move mate::Event to gin * refactor: move mate::Locker to gin * refactor: convert contextBridge to gin * refactor: convert contentTracing to gin * refactor: remove callback converter of native_mate * refactor: remove file_dialog_converter and native_window_converter from native_mate * refactor: convert webFrame to gin * refactor: move blink_converter to gin * refactor: remove net_converter from native_mate * refactor: remove event_emitter_caller_deprecated * refactor: remove gurl_converter from native_mate * refactor: remove file_path and string16_converter from native_mate * refactor: remove image_converter from native_mate * refactor: move value_converter to gin
32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
// Copyright 2014 Cheng Zhao. All rights reserved.
|
|
// Use of this source code is governed by MIT license that can be found in the
|
|
// LICENSE file.
|
|
|
|
#include "shell/common/gin_helper/persistent_dictionary.h"
|
|
|
|
namespace gin_helper {
|
|
|
|
PersistentDictionary::PersistentDictionary() = default;
|
|
|
|
PersistentDictionary::PersistentDictionary(v8::Isolate* isolate,
|
|
v8::Local<v8::Object> object)
|
|
: isolate_(isolate), handle_(isolate, object) {}
|
|
|
|
PersistentDictionary::PersistentDictionary(const PersistentDictionary& other)
|
|
: isolate_(other.isolate_),
|
|
handle_(isolate_, v8::Local<v8::Object>::New(isolate_, other.handle_)) {}
|
|
|
|
PersistentDictionary::~PersistentDictionary() = default;
|
|
|
|
PersistentDictionary& PersistentDictionary::operator=(
|
|
const PersistentDictionary& other) {
|
|
isolate_ = other.isolate_;
|
|
handle_.Reset(isolate_, v8::Local<v8::Object>::New(isolate_, other.handle_));
|
|
return *this;
|
|
}
|
|
|
|
v8::Local<v8::Object> PersistentDictionary::GetHandle() const {
|
|
return v8::Local<v8::Object>::New(isolate_, handle_);
|
|
}
|
|
|
|
} // namespace gin_helper
|