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

Unified Diff: gin/function_template_util.cc

Issue 76923003: First cut at gin::Bind() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix return 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/function_template_util.cc
diff --git a/gin/function_template_util.cc b/gin/function_template_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7d5877824d3a7dbc6fbbc5110b4b2c544676d4d0
--- /dev/null
+++ b/gin/function_template_util.cc
@@ -0,0 +1,25 @@
+// 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 "gin/function_template_util.h"
abarth-chromium 2013/11/22 09:17:13 function_template_util <-- Can we give this a sna
Aaron Boodman 2013/11/22 18:01:01 Done. Yeah I always struggle with naming with C++
+
+namespace gin {
+
+WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
+
+// static
+void CallbackHolderBase::Register(v8::Isolate* isolate) {
abarth-chromium 2013/11/22 09:17:13 EnsureRegistered? Who's job is it to call this fu
+ PerIsolateData* data = PerIsolateData::From(isolate);
+ if (!data->GetObjectTemplate(&kWrapperInfo).IsEmpty())
+ return;
+ v8::Handle<v8::ObjectTemplate> templ(v8::ObjectTemplate::New());
+ templ->SetInternalFieldCount(kNumberOfInternalFields);
+ data->SetObjectTemplate(&kWrapperInfo, templ);
+}
+
+WrapperInfo* CallbackHolderBase::GetWrapperInfo() {
+ return &kWrapperInfo;
+}
+
+} // namespace gin

Powered by Google App Engine
This is Rietveld 408576698