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

Unified Diff: gin/function_template.cc

Issue 105743007: Gin: Make it easier to implement Wrappable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: gin/function_template.cc
diff --git a/gin/function_template.cc b/gin/function_template.cc
index 07882e8796e8ac3c9aab37d91677aa44300fd3f6..5a834a3c5168eb4a568921e920ac0c80eb86ba01 100644
--- a/gin/function_template.cc
+++ b/gin/function_template.cc
@@ -8,23 +8,18 @@
namespace gin {
-WrapperInfo internal::CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
-
-WrapperInfo* internal::CallbackHolderBase::GetWrapperInfo() {
- return &kWrapperInfo;
-}
-
void InitFunctionTemplates(PerIsolateData* isolate_data) {
if (!isolate_data->GetObjectTemplate(
- &internal::CallbackHolderBase::kWrapperInfo).IsEmpty()) {
+ &WrappableTraits<internal::CallbackHolderBase>::
Aaron Boodman 2013/12/06 06:36:24 I'm going to automate function template registrati
+ kWrapperInfo).IsEmpty()) {
return;
}
v8::Handle<v8::ObjectTemplate> templ(
v8::ObjectTemplate::New(isolate_data->isolate()));
templ->SetInternalFieldCount(kNumberOfInternalFields);
- isolate_data->SetObjectTemplate(&internal::CallbackHolderBase::kWrapperInfo,
- templ);
+ isolate_data->SetObjectTemplate(
+ &WrappableTraits<internal::CallbackHolderBase>::kWrapperInfo, templ);
}
} // namespace gin
« no previous file with comments | « gin/function_template.h ('k') | gin/function_template.h.pump » ('j') | gin/wrappable.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698