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

Unified Diff: gin/per_isolate_data.cc

Issue 59153005: Begin implementing V8 bindings for Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix skipped comment 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
« gin/arguments.cc ('K') | « gin/per_isolate_data.h ('k') | gin/runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/per_isolate_data.cc
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
index 13209046cd9b4e896f67987c7f054fd9e55c9ee3..56b2c533fb08ca2c7ca86c2f6662a54f51801a89 100644
--- a/gin/per_isolate_data.cc
+++ b/gin/per_isolate_data.cc
@@ -25,9 +25,17 @@ PerIsolateData* PerIsolateData::From(Isolate* isolate) {
return static_cast<PerIsolateData*>(isolate->GetData());
}
-void PerIsolateData::RegisterObjectTemplate(
- WrapperInfo* info, Local<ObjectTemplate> object_template) {
- object_templates_[info] = Eternal<ObjectTemplate>(isolate_, object_template);
+void PerIsolateData::SetObjectTemplate(WrapperInfo* info,
+ Local<ObjectTemplate> templ) {
+ object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
+}
+
+v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
+ WrapperInfo* info) {
+ ObjectTemplateMap::iterator it = object_templates_.find(info);
+ if (it == object_templates_.end())
+ return v8::Local<v8::ObjectTemplate>();
+ return it->second.Get(isolate_);
}
} // namespace gin
« gin/arguments.cc ('K') | « gin/per_isolate_data.h ('k') | gin/runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698