| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf
o.GetIsolate()); | 51 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf
o.GetIsolate()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 54 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 55 { | 55 { |
| 56 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 56 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 57 SVGTestInterfaceV8Internal::typeAttributeGetter(info); | 57 SVGTestInterfaceV8Internal::typeAttributeGetter(info); |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 static void typeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property
CallbackInfo<void>& info) | 61 static void typeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 62 { | 62 { |
| 63 v8::Handle<v8::Object> holder = info.Holder(); | 63 v8::Handle<v8::Object> holder = info.Holder(); |
| 64 SVGTestInterface* impl = V8SVGTestInterface::toNative(holder); | 64 SVGTestInterface* impl = V8SVGTestInterface::toNative(holder); |
| 65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 66 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 66 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 67 impl->setAttribute(SVGNames::typeAttr, cppValue); | 67 impl->setAttribute(SVGNames::typeAttr, cppValue); |
| 68 } | 68 } |
| 69 | 69 |
| 70 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 70 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 71 { | 71 { |
| 72 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 73 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 73 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 74 SVGTestInterfaceV8Internal::typeAttributeSetter(jsValue, info); | 74 SVGTestInterfaceV8Internal::typeAttributeSetter(v8Value, info); |
| 75 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace SVGTestInterfaceV8Internal | 78 } // namespace SVGTestInterfaceV8Internal |
| 79 | 79 |
| 80 static const V8DOMConfiguration::AttributeConfiguration V8SVGTestInterfaceAttrib
utes[] = { | 80 static const V8DOMConfiguration::AttributeConfiguration V8SVGTestInterfaceAttrib
utes[] = { |
| 81 {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInt
erfaceV8Internal::typeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, | 81 {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInt
erfaceV8Internal::typeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 static void configureV8SVGTestInterfaceTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate) | 84 static void configureV8SVGTestInterfaceTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 105 if (!result.IsEmpty()) | 105 if (!result.IsEmpty()) |
| 106 return result; | 106 return result; |
| 107 | 107 |
| 108 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 108 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 109 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 109 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 110 configureV8SVGTestInterfaceTemplate(result, isolate); | 110 configureV8SVGTestInterfaceTemplate(result, isolate); |
| 111 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 111 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
| 112 return result; | 112 return result; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool V8SVGTestInterface::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate*
isolate) | 115 bool V8SVGTestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate*
isolate) |
| 116 { | 116 { |
| 117 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 117 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 118 } | 118 } |
| 119 | 119 |
| 120 v8::Handle<v8::Object> V8SVGTestInterface::findInstanceInPrototypeChain(v8::Hand
le<v8::Value> jsValue, v8::Isolate* isolate) | 120 v8::Handle<v8::Object> V8SVGTestInterface::findInstanceInPrototypeChain(v8::Hand
le<v8::Value> v8Value, v8::Isolate* isolate) |
| 121 { | 121 { |
| 122 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 122 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 123 } | 123 } |
| 124 | 124 |
| 125 SVGTestInterface* V8SVGTestInterface::toNativeWithTypeCheck(v8::Isolate* isolate
, v8::Handle<v8::Value> value) | 125 SVGTestInterface* V8SVGTestInterface::toNativeWithTypeCheck(v8::Isolate* isolate
, v8::Handle<v8::Value> value) |
| 126 { | 126 { |
| 127 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 127 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 128 } | 128 } |
| 129 | 129 |
| 130 v8::Handle<v8::Object> V8SVGTestInterface::createWrapper(PassRefPtr<SVGTestInter
face> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 130 v8::Handle<v8::Object> V8SVGTestInterface::createWrapper(PassRefPtr<SVGTestInter
face> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 131 { | 131 { |
| 132 ASSERT(impl); | 132 ASSERT(impl); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 152 fromInternalPointer(object)->deref(); | 152 fromInternalPointer(object)->deref(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 template<> | 155 template<> |
| 156 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 156 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 157 { | 157 { |
| 158 return toV8(impl, creationContext, isolate); | 158 return toV8(impl, creationContext, isolate); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace WebCore | 161 } // namespace WebCore |
| OLD | NEW |