OLD | NEW |
---|---|
(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" | |
abarth-chromium
2013/11/22 09:17:13
function_template_util <-- Can we give this a sna
Aaron Boodman
2013/11/22 18:01:01
Done.
Yeah I always struggle with naming with C++
| |
6 | |
7 namespace gin { | |
8 | |
9 WrapperInfo CallbackHolderBase::kWrapperInfo = { kEmbedderNativeGin }; | |
10 | |
11 // static | |
12 void CallbackHolderBase::Register(v8::Isolate* isolate) { | |
abarth-chromium
2013/11/22 09:17:13
EnsureRegistered? Who's job is it to call this fu
| |
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 | |
OLD | NEW |