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

Side by Side 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: k 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "gin/function_template_util.h"
6
7 namespace gin {
8
9 WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin };
10
11 // static
12 void CallbackHolderBase::Register(v8::Isolate* isolate) {
13 PerIsolateData* data = PerIsolateData::From(isolate);
14 if (!data->GetObjectTemplate(&kWrapperInfo).IsEmpty())
15 return;
16 v8::Handle<v8::ObjectTemplate> templ(v8::ObjectTemplate::New());
17 templ->SetInternalFieldCount(kNumberOfInternalFields);
18 data->SetObjectTemplate(&kWrapperInfo, templ);
19 }
20
21 WrapperInfo* CallbackHolderBase::GetWrapperInfo() {
22 return &kWrapperInfo;
23 }
24
25 } // namespace gin
OLDNEW
« gin/function_template_util.h ('K') | « gin/function_template_util.h ('k') | gin/gin.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698