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