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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gin/function_template.h ('k') | gin/function_template.h.pump » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gin/function_template.h" 5 #include "gin/function_template.h"
6 6
7 #include "gin/per_isolate_data.h"
8
9 namespace gin { 7 namespace gin {
10 8
11 WrapperInfo internal::CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin }; 9 namespace internal {
12 10
13 void InitFunctionTemplates(PerIsolateData* isolate_data) { 11 WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
14 if (!isolate_data->GetObjectTemplate(
15 &internal::CallbackHolderBase::kWrapperInfo).IsEmpty()) {
16 return;
17 }
18 12
19 v8::Handle<v8::ObjectTemplate> templ( 13 } // namespace internal
20 v8::ObjectTemplate::New(isolate_data->isolate()));
21 templ->SetInternalFieldCount(kNumberOfInternalFields);
22 isolate_data->SetObjectTemplate(&internal::CallbackHolderBase::kWrapperInfo,
23 templ);
24 }
25 14
26 } // namespace gin 15 } // namespace gin
OLDNEW
« 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