| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 66 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 67 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 67 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 68 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 68 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 69 if (!result.IsEmpty()) | 69 if (!result.IsEmpty()) |
| 70 return result; | 70 return result; |
| 71 | 71 |
| 72 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 72 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 73 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructor2
ConstructorCallback); | 73 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructor2
ConstructorCallback); |
| 74 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 74 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
| 75 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor2::in
ternalFieldCount); | 75 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor2::in
ternalFieldCount); |
| 76 result->SetClassName(v8AtomicString(isolate, "TestInterfaceNamedConstructor2
")); | 76 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceNamedConstructor2")); |
| 77 result->Inherit(V8TestInterfaceNamedConstructor2::domTemplate(isolate)); | 77 result->Inherit(V8TestInterfaceNamedConstructor2::domTemplate(isolate)); |
| 78 data->setDOMTemplate(&domTemplateKey, result); | 78 data->setDOMTemplate(&domTemplateKey, result); |
| 79 return result; | 79 return result; |
| 80 } | 80 } |
| 81 | 81 |
| 82 static void installV8TestInterfaceNamedConstructor2Template(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) | 82 static void installV8TestInterfaceNamedConstructor2Template(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) |
| 83 { | 83 { |
| 84 functionTemplate->ReadOnlyPrototype(); | 84 functionTemplate->ReadOnlyPrototype(); |
| 85 | 85 |
| 86 v8::Local<v8::Signature> defaultSignature; | 86 v8::Local<v8::Signature> defaultSignature; |
| 87 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor2", v8::Local<v8::FunctionTemplate>(
), V8TestInterfaceNamedConstructor2::internalFieldCount, | 87 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNamedConstructor2", v8::Local<v8::FunctionTemplate>(
), V8TestInterfaceNamedConstructor2::internalFieldCount, |
| 88 0, 0, | 88 0, 0, |
| 89 0, 0, | 89 0, 0, |
| 90 0, 0); | 90 0, 0); |
| 91 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 91 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 92 ALLOW_UNUSED_LOCAL(instanceTemplate); | 92 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 93 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 93 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 94 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 94 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 95 | 95 |
| 96 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceNamedConstructor2")); |
| 97 |
| 98 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i
solate, "TestInterfaceNamedConstructor2Prototype")); |
| 99 |
| 96 // Custom toString template | 100 // Custom toString template |
| 97 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 101 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 98 } | 102 } |
| 99 | 103 |
| 100 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2::domTemplate(v8
::Isolate* isolate) | 104 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2::domTemplate(v8
::Isolate* isolate) |
| 101 { | 105 { |
| 102 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructor2Template); | 106 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructor2Template); |
| 103 } | 107 } |
| 104 | 108 |
| 105 bool V8TestInterfaceNamedConstructor2::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) | 109 bool V8TestInterfaceNamedConstructor2::hasInstance(v8::Local<v8::Value> v8Value,
v8::Isolate* isolate) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 121 { | 125 { |
| 122 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->ref(); | 126 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->ref(); |
| 123 } | 127 } |
| 124 | 128 |
| 125 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappable* scriptWrappa
ble) | 129 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappable* scriptWrappa
ble) |
| 126 { | 130 { |
| 127 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->deref(); | 131 scriptWrappable->toImpl<TestInterfaceNamedConstructor2>()->deref(); |
| 128 } | 132 } |
| 129 | 133 |
| 130 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |