| 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 "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 148 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 149 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 149 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 150 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 150 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 151 if (!result.IsEmpty()) | 151 if (!result.IsEmpty()) |
| 152 return result; | 152 return result; |
| 153 | 153 |
| 154 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 154 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 155 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructorC
onstructorCallback); | 155 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructorC
onstructorCallback); |
| 156 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 156 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
| 157 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor::int
ernalFieldCount); | 157 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor::int
ernalFieldCount); |
| 158 result->SetClassName(v8AtomicString(isolate, "TestInterfaceNamedConstructor"
)); | 158 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceNamedConstructor")); |
| 159 result->Inherit(V8TestInterfaceNamedConstructor::domTemplate(isolate)); | 159 result->Inherit(V8TestInterfaceNamedConstructor::domTemplate(isolate)); |
| 160 data->setDOMTemplate(&domTemplateKey, result); | 160 data->setDOMTemplate(&domTemplateKey, result); |
| 161 return result; | 161 return result; |
| 162 } | 162 } |
| 163 | 163 |
| 164 static void installV8TestInterfaceNamedConstructorTemplate(v8::Local<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate) | 164 static void installV8TestInterfaceNamedConstructorTemplate(v8::Local<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate) |
| 165 { | 165 { |
| 166 functionTemplate->ReadOnlyPrototype(); | 166 functionTemplate->ReadOnlyPrototype(); |
| 167 | 167 |
| 168 v8::Local<v8::Signature> defaultSignature; | 168 v8::Local<v8::Signature> defaultSignature; |
| 169 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor", v8::Local<v8::FunctionTemplate>()
, V8TestInterfaceNamedConstructor::internalFieldCount, | 169 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor", v8::Local<v8::FunctionTemplate>()
, V8TestInterfaceNamedConstructor::internalFieldCount, |
| 170 V8TestInterfaceNamedConstructorAttributes, WTF_ARRAY_LENGTH(V8TestInterf
aceNamedConstructorAttributes), | 170 V8TestInterfaceNamedConstructorAttributes, WTF_ARRAY_LENGTH(V8TestInterf
aceNamedConstructorAttributes), |
| 171 0, 0, | 171 0, 0, |
| 172 0, 0); | 172 0, 0); |
| 173 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 173 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 174 ALLOW_UNUSED_LOCAL(instanceTemplate); | 174 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 175 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 175 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 176 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 176 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 177 | 177 |
| 178 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceNamedConstructor")); |
| 179 |
| 180 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i
solate, "TestInterfaceNamedConstructorPrototype")); |
| 181 |
| 178 // Custom toString template | 182 // Custom toString template |
| 179 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 183 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 180 } | 184 } |
| 181 | 185 |
| 182 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor::domTemplate(v8:
:Isolate* isolate) | 186 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor::domTemplate(v8:
:Isolate* isolate) |
| 183 { | 187 { |
| 184 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructorTemplate); | 188 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructorTemplate); |
| 185 } | 189 } |
| 186 | 190 |
| 187 bool V8TestInterfaceNamedConstructor::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) | 191 bool V8TestInterfaceNamedConstructor::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 208 { | 212 { |
| 209 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); | 213 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); |
| 210 } | 214 } |
| 211 | 215 |
| 212 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) | 216 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) |
| 213 { | 217 { |
| 214 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); | 218 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); |
| 215 } | 219 } |
| 216 | 220 |
| 217 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |