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

Unified Diff: gin/function_template.cc

Issue 76923003: First cut at gin::Bind() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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.cc
diff --git a/gin/function_template.cc b/gin/function_template.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9815b676797260acf9a6a9a674d416be2515b19f
--- /dev/null
+++ b/gin/function_template.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 "gin/function_template.h"
+
+#include "gin/per_isolate_data.h"
+
+namespace gin {
+
+WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
+
+// static
+void CallbackHolderBase::EnsureRegistered(PerIsolateData* isolate_data) {
+ if (!isolate_data->GetObjectTemplate(&kWrapperInfo).IsEmpty())
+ return;
+ v8::Handle<v8::ObjectTemplate> templ(v8::ObjectTemplate::New());
+ templ->SetInternalFieldCount(kNumberOfInternalFields);
+ isolate_data->SetObjectTemplate(&kWrapperInfo, templ);
+}
+
+WrapperInfo* CallbackHolderBase::GetWrapperInfo() {
+ return &kWrapperInfo;
+}
+
+} // namespace gin
« gin/function_template.h ('K') | « gin/function_template.h ('k') | gin/gin.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698