| 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 "V8TestInterfaceEventTarget.h" | 8 #include "V8TestInterfaceEventTarget.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 57 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 58 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 58 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 59 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 59 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 60 if (!result.IsEmpty()) | 60 if (!result.IsEmpty()) |
| 61 return result; | 61 return result; |
| 62 | 62 |
| 63 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 63 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 64 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceEventTargetConstr
uctorCallback); | 64 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceEventTargetConstr
uctorCallback); |
| 65 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 65 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
| 66 instanceTemplate->SetInternalFieldCount(V8TestInterfaceEventTarget::internal
FieldCount); | 66 instanceTemplate->SetInternalFieldCount(V8TestInterfaceEventTarget::internal
FieldCount); |
| 67 result->SetClassName(v8AtomicString(isolate, "TestInterfaceEventTarget")); | 67 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceEventTarget")); |
| 68 result->Inherit(V8TestInterfaceEventTarget::domTemplate(isolate)); | 68 result->Inherit(V8TestInterfaceEventTarget::domTemplate(isolate)); |
| 69 data->setDOMTemplate(&domTemplateKey, result); | 69 data->setDOMTemplate(&domTemplateKey, result); |
| 70 return result; | 70 return result; |
| 71 } | 71 } |
| 72 | 72 |
| 73 static void installV8TestInterfaceEventTargetTemplate(v8::Local<v8::FunctionTemp
late> functionTemplate, v8::Isolate* isolate) | 73 static void installV8TestInterfaceEventTargetTemplate(v8::Local<v8::FunctionTemp
late> functionTemplate, v8::Isolate* isolate) |
| 74 { | 74 { |
| 75 functionTemplate->ReadOnlyPrototype(); | 75 functionTemplate->ReadOnlyPrototype(); |
| 76 | 76 |
| 77 v8::Local<v8::Signature> defaultSignature; | 77 v8::Local<v8::Signature> defaultSignature; |
| 78 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventTarget", V8EventTarget::domTemplate(isolate), V
8TestInterfaceEventTarget::internalFieldCount, | 78 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventTarget", V8EventTarget::domTemplate(isolate), V
8TestInterfaceEventTarget::internalFieldCount, |
| 79 0, 0, | 79 0, 0, |
| 80 0, 0, | 80 0, 0, |
| 81 0, 0); | 81 0, 0); |
| 82 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 82 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 83 ALLOW_UNUSED_LOCAL(instanceTemplate); | 83 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 84 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 84 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 85 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 85 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 86 | 86 |
| 87 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is
olate, "TestInterfaceEventTarget")); |
| 88 |
| 89 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i
solate, "TestInterfaceEventTargetPrototype")); |
| 90 |
| 87 // Custom toString template | 91 // Custom toString template |
| 88 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 92 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 89 } | 93 } |
| 90 | 94 |
| 91 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventTarget::domTemplate(v8::Isol
ate* isolate) | 95 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventTarget::domTemplate(v8::Isol
ate* isolate) |
| 92 { | 96 { |
| 93 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceEventTargetTemplate); | 97 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceEventTargetTemplate); |
| 94 } | 98 } |
| 95 | 99 |
| 96 bool V8TestInterfaceEventTarget::hasInstance(v8::Local<v8::Value> v8Value, v8::I
solate* isolate) | 100 bool V8TestInterfaceEventTarget::hasInstance(v8::Local<v8::Value> v8Value, v8::I
solate* isolate) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 116 } | 120 } |
| 117 | 121 |
| 118 void V8TestInterfaceEventTarget::derefObject(ScriptWrappable* scriptWrappable) | 122 void V8TestInterfaceEventTarget::derefObject(ScriptWrappable* scriptWrappable) |
| 119 { | 123 { |
| 120 #if !ENABLE(OILPAN) | 124 #if !ENABLE(OILPAN) |
| 121 scriptWrappable->toImpl<TestInterfaceEventTarget>()->deref(); | 125 scriptWrappable->toImpl<TestInterfaceEventTarget>()->deref(); |
| 122 #endif | 126 #endif |
| 123 } | 127 } |
| 124 | 128 |
| 125 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |