OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestInterfaceNamedConstructor2.h" | 8 #include "V8TestInterfaceNamedConstructor2.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 65 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
66 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 66 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
67 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 67 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
68 if (!result.IsEmpty()) | 68 if (!result.IsEmpty()) |
69 return result; | 69 return result; |
70 | 70 |
71 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 71 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
72 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructor2
ConstructorCallback); | 72 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructor2
ConstructorCallback); |
73 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 73 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
74 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor2::in
ternalFieldCount); | 74 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor2::in
ternalFieldCount); |
75 result->SetClassName(v8AtomicString(isolate, "TestInterfaceNamedConstructor2
")); | |
76 result->Inherit(V8TestInterfaceNamedConstructor2::domTemplate(isolate)); | 75 result->Inherit(V8TestInterfaceNamedConstructor2::domTemplate(isolate)); |
77 data->setDOMTemplate(&domTemplateKey, result); | 76 data->setDOMTemplate(&domTemplateKey, result); |
78 return result; | 77 return result; |
79 } | 78 } |
80 | 79 |
81 static void installV8TestInterfaceNamedConstructor2Template(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) | 80 static void installV8TestInterfaceNamedConstructor2Template(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) |
82 { | 81 { |
83 functionTemplate->ReadOnlyPrototype(); | 82 functionTemplate->ReadOnlyPrototype(); |
84 | 83 |
85 v8::Local<v8::Signature> defaultSignature; | 84 v8::Local<v8::Signature> defaultSignature; |
86 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor2", v8::Local<v8::FunctionTemplate>(
), V8TestInterfaceNamedConstructor2::internalFieldCount, | 85 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor2", v8::Local<v8::FunctionTemplate>(
), V8TestInterfaceNamedConstructor2::internalFieldCount, |
87 0, 0, | 86 0, 0, |
88 0, 0, | 87 0, 0, |
89 0, 0); | 88 0, 0); |
90 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 89 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
91 ALLOW_UNUSED_LOCAL(instanceTemplate); | 90 ALLOW_UNUSED_LOCAL(instanceTemplate); |
92 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 91 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
93 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 92 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
94 | 93 |
| 94 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i
solate, "TestInterfaceNamedConstructor2")); |
| 95 |
95 // Custom toString template | 96 // Custom toString template |
96 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 97 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
97 } | 98 } |
98 | 99 |
99 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2::domTemplate(v8
::Isolate* isolate) | 100 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2::domTemplate(v8
::Isolate* isolate) |
100 { | 101 { |
101 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructor2Template); | 102 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructor2Template); |
102 } | 103 } |
103 | 104 |
104 bool V8TestInterfaceNamedConstructor2::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) | 105 bool V8TestInterfaceNamedConstructor2::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) |
(...skipping 15 matching lines...) Expand all Loading... |
120 { | 121 { |
121 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->ref(); | 122 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->ref(); |
122 } | 123 } |
123 | 124 |
124 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappable* scriptWrappa
ble) | 125 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappable* scriptWrappa
ble) |
125 { | 126 { |
126 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->deref(); | 127 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->deref(); |
127 } | 128 } |
128 | 129 |
129 } // namespace blink | 130 } // namespace blink |
OLD | NEW |