| Index: mojo/public/bindings/js/v8_per_isolate_data.cc
|
| diff --git a/mojo/public/bindings/js/v8_per_isolate_data.cc b/mojo/public/bindings/js/v8_per_isolate_data.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2cde66a46d38c712927ea39d334a8404734c8ecb
|
| --- /dev/null
|
| +++ b/mojo/public/bindings/js/v8_per_isolate_data.cc
|
| @@ -0,0 +1,26 @@
|
| +// 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 file.
|
| +
|
| +#include "mojo/public/bindings/js/v8_per_isolate_data.h"
|
| +
|
| +#include "mojo/public/bindings/js/v8_core.h"
|
| +
|
| +namespace mojo {
|
| +namespace js {
|
| +
|
| +V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate)
|
| + : isolate_(isolate),
|
| + handle_template_(isolate, Wrapper<mojo::Handle>::CreateTemplate()) {
|
| + isolate_->SetData(this);
|
| +}
|
| +
|
| +V8PerIsolateData::~V8PerIsolateData() {
|
| +}
|
| +
|
| +V8PerIsolateData* From(v8::Isolate* isolate) {
|
| + return static_cast<V8PerIsolateData*>(isolate->GetData());
|
| +}
|
| +
|
| +} // namespace js
|
| +} // mojo
|
|
|