Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Unified Diff: mojo/public/bindings/js/v8_per_isolate_data.cc

Issue 59153005: Begin implementing V8 bindings for Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: spelling Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698