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

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: Moar copyright 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: gin/per_isolate_data.cc
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
index 13209046cd9b4e896f67987c7f054fd9e55c9ee3..0f7a13c0a6ecbb21347d584ad6cb27ecaf51a67d 100644
--- a/gin/per_isolate_data.cc
+++ b/gin/per_isolate_data.cc
@@ -25,9 +25,18 @@ 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::RegisterObjectTemplate(WrapperInfo* info,
+ Local<ObjectTemplate> templ) {
+ object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
+}
+
+bool PerIsolateData::GetObjectTemplate(WrapperInfo* info,
Aaron Boodman 2013/11/11 19:01:08 You can avoid the two return values by having this
abarth-chromium 2013/11/11 20:17:42 Ok.
+ Local<ObjectTemplate>* out) {
+ ObjectTemplateMap::iterator it = object_templates_.find(info);
+ if (it == object_templates_.end())
+ return false;
+ *out = it->second.Get(isolate_);
+ return true;
}
} // namespace gin

Powered by Google App Engine
This is Rietveld 408576698