| 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 "V8SVGTestInterface.h" | 8 #include "V8SVGTestInterface.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin
k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::refObject, V8SVGTestInte
rface::derefObject, V8SVGTestInterface::trace, 0, 0, V8SVGTestInterface::install
ConditionallyEnabledMethods, V8SVGTestInterface::installConditionallyEnabledProp
erties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectC
lassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent,
WrapperTypeInfo::RefCountedObject }; | 25 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin
k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::refObject, V8SVGTestInte
rface::derefObject, V8SVGTestInterface::trace, 0, 0, V8SVGTestInterface::install
ConditionallyEnabledMethods, V8SVGTestInterface::installConditionallyEnabledProp
erties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectC
lassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent,
WrapperTypeInfo::RefCountedObject }; |
| 26 | 26 |
| 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in SVGTestInter
face.h. | 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in SVGTestInter
face.h. |
| 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 29 // bindings/core/v8/ScriptWrappable.h. | 29 // bindings/core/v8/ScriptWrappable.h. |
| 30 const WrapperTypeInfo& SVGTestInterface::s_wrapperTypeInfo = V8SVGTestInterface:
:wrapperTypeInfo; | 30 const WrapperTypeInfo& SVGTestInterface::s_wrapperTypeInfo = V8SVGTestInterface:
:wrapperTypeInfo; |
| 31 | 31 |
| 32 namespace SVGTestInterfaceV8Internal { | 32 namespace SVGTestInterfaceV8Internal { |
| 33 | 33 |
| 34 static void typeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 34 static void typeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 35 { | 35 { |
| 36 v8::Local<v8::Object> holder = info.Holder(); | 36 v8::Local<v8::Object> holder = info.Holder(); |
| 37 SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder); | 37 SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder); |
| 38 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf
o.GetIsolate()); | 38 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf
o.GetIsolate()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 41 static void typeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 42 { | 42 { |
| 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 44 SVGTestInterfaceV8Internal::typeAttributeGetter(info); | 44 SVGTestInterfaceV8Internal::typeAttributeGetter(info); |
| 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 46 } | 46 } |
| 47 | 47 |
| 48 static void typeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 48 static void typeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Function
CallbackInfo<v8::Value>& info) |
| 49 { | 49 { |
| 50 v8::Local<v8::Object> holder = info.Holder(); | 50 v8::Local<v8::Object> holder = info.Holder(); |
| 51 SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder); | 51 SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder); |
| 52 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 52 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 53 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 53 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 54 impl->setAttribute(SVGNames::typeAttr, cppValue); | 54 impl->setAttribute(SVGNames::typeAttr, cppValue); |
| 55 } | 55 } |
| 56 | 56 |
| 57 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 57 static void typeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 58 { | 58 { |
| 59 v8::Local<v8::Value> v8Value = info[0]; |
| 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 60 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 61 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 61 SVGTestInterfaceV8Internal::typeAttributeSetter(v8Value, info); | 62 SVGTestInterfaceV8Internal::typeAttributeSetter(v8Value, info); |
| 62 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 63 } | 64 } |
| 64 | 65 |
| 65 } // namespace SVGTestInterfaceV8Internal | 66 } // namespace SVGTestInterfaceV8Internal |
| 66 | 67 |
| 67 static const V8DOMConfiguration::AttributeConfiguration V8SVGTestInterfaceAttrib
utes[] = { | 68 static const V8DOMConfiguration::AccessorConfiguration V8SVGTestInterfaceAccesso
rs[] = { |
| 68 {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInt
erfaceV8Internal::typeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 69 {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInt
erfaceV8Internal::typeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts}, |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 static void installV8SVGTestInterfaceTemplate(v8::Local<v8::FunctionTemplate> fu
nctionTemplate, v8::Isolate* isolate) | 72 static void installV8SVGTestInterfaceTemplate(v8::Local<v8::FunctionTemplate> fu
nctionTemplate, v8::Isolate* isolate) |
| 72 { | 73 { |
| 73 functionTemplate->ReadOnlyPrototype(); | 74 functionTemplate->ReadOnlyPrototype(); |
| 74 | 75 |
| 75 v8::Local<v8::Signature> defaultSignature; | 76 v8::Local<v8::Signature> defaultSignature; |
| 76 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "SVGTestInterface", v8::Local<v8::FunctionTemplate>(), V8SVGTestIn
terface::internalFieldCount, | 77 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "SVGTestInterface", v8::Local<v8::FunctionTemplate>(), V8SVGTestIn
terface::internalFieldCount, |
| 77 V8SVGTestInterfaceAttributes, WTF_ARRAY_LENGTH(V8SVGTestInterfaceAttribu
tes), | |
| 78 0, 0, | 78 0, 0, |
| 79 V8SVGTestInterfaceAccessors, WTF_ARRAY_LENGTH(V8SVGTestInterfaceAccessor
s), |
| 79 0, 0); | 80 0, 0); |
| 80 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 81 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 81 ALLOW_UNUSED_LOCAL(instanceTemplate); | 82 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 82 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 83 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 83 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 84 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 84 | 85 |
| 85 // Custom toString template | 86 // Custom toString template |
| 86 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 87 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 87 } | 88 } |
| 88 | 89 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 110 { | 111 { |
| 111 scriptWrappable->toImpl<SVGTestInterface>()->ref(); | 112 scriptWrappable->toImpl<SVGTestInterface>()->ref(); |
| 112 } | 113 } |
| 113 | 114 |
| 114 void V8SVGTestInterface::derefObject(ScriptWrappable* scriptWrappable) | 115 void V8SVGTestInterface::derefObject(ScriptWrappable* scriptWrappable) |
| 115 { | 116 { |
| 116 scriptWrappable->toImpl<SVGTestInterface>()->deref(); | 117 scriptWrappable->toImpl<SVGTestInterface>()->deref(); |
| 117 } | 118 } |
| 118 | 119 |
| 119 } // namespace blink | 120 } // namespace blink |
| OLD | NEW |