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

Unified Diff: gin/function_template.cc

Issue 113893005: [gin] Introduce Wrappable::GetObjectTemplate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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
« no previous file with comments | « gin/function_template.h ('k') | gin/function_template.h.pump » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/function_template.cc
diff --git a/gin/function_template.cc b/gin/function_template.cc
index 5dd5ecd3d50ef73f857456c2277213838d04e9f0..243ac124516bf51f6eca54932ca661d30afe5e93 100644
--- a/gin/function_template.cc
+++ b/gin/function_template.cc
@@ -4,23 +4,12 @@
#include "gin/function_template.h"
-#include "gin/per_isolate_data.h"
-
namespace gin {
-WrapperInfo internal::CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
+namespace internal {
-void InitFunctionTemplates(PerIsolateData* isolate_data) {
- if (!isolate_data->GetObjectTemplate(
- &internal::CallbackHolderBase::kWrapperInfo).IsEmpty()) {
- return;
- }
+WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
- v8::Handle<v8::ObjectTemplate> templ(
- v8::ObjectTemplate::New(isolate_data->isolate()));
- templ->SetInternalFieldCount(kNumberOfInternalFields);
- isolate_data->SetObjectTemplate(&internal::CallbackHolderBase::kWrapperInfo,
- templ);
-}
+} // namespace internal
} // namespace gin
« no previous file with comments | « gin/function_template.h ('k') | gin/function_template.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698