| 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 "V8TestNode.h" | 8 #include "V8TestNode.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // bindings/core/v8/ScriptWrappable.h. | 42 // bindings/core/v8/ScriptWrappable.h. |
| 43 const WrapperTypeInfo& TestNode::s_wrapperTypeInfo = V8TestNode::wrapperTypeInfo
; | 43 const WrapperTypeInfo& TestNode::s_wrapperTypeInfo = V8TestNode::wrapperTypeInfo
; |
| 44 | 44 |
| 45 namespace TestNodeV8Internal { | 45 namespace TestNodeV8Internal { |
| 46 | 46 |
| 47 template <typename T> void V8_USE(T) { } | 47 template <typename T> void V8_USE(T) { } |
| 48 | 48 |
| 49 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 49 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 50 { | 50 { |
| 51 v8::Handle<v8::Object> holder = info.Holder(); | 51 v8::Handle<v8::Object> holder = info.Holder(); |
| 52 TestNode* impl = V8TestNode::toNative(holder); | 52 TestNode* impl = V8TestNode::toImpl(holder); |
| 53 v8SetReturnValueString(info, impl->href(), info.GetIsolate()); | 53 v8SetReturnValueString(info, impl->href(), info.GetIsolate()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 static void hrefAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 56 static void hrefAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 57 { | 57 { |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 59 TestNodeV8Internal::hrefAttributeGetter(info); | 59 TestNodeV8Internal::hrefAttributeGetter(info); |
| 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 61 } | 61 } |
| 62 | 62 |
| 63 static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 63 static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 64 { | 64 { |
| 65 v8::Handle<v8::Object> holder = info.Holder(); | 65 v8::Handle<v8::Object> holder = info.Holder(); |
| 66 TestNode* impl = V8TestNode::toNative(holder); | 66 TestNode* impl = V8TestNode::toImpl(holder); |
| 67 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 67 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 68 impl->setHref(cppValue); | 68 impl->setHref(cppValue); |
| 69 } | 69 } |
| 70 | 70 |
| 71 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 71 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 72 { | 72 { |
| 73 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 74 TestNodeV8Internal::hrefAttributeSetter(v8Value, info); | 74 TestNodeV8Internal::hrefAttributeSetter(v8Value, info); |
| 75 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 76 } | 76 } |
| 77 | 77 |
| 78 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 78 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 79 { | 79 { |
| 80 v8::Handle<v8::Object> holder = info.Holder(); | 80 v8::Handle<v8::Object> holder = info.Holder(); |
| 81 TestNode* impl = V8TestNode::toNative(holder); | 81 TestNode* impl = V8TestNode::toImpl(holder); |
| 82 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate()); | 82 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 85 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 86 { | 86 { |
| 87 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 87 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 88 TestNodeV8Internal::hrefThrowsAttributeGetter(info); | 88 TestNodeV8Internal::hrefThrowsAttributeGetter(info); |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 90 } | 90 } |
| 91 | 91 |
| 92 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) | 92 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
| 93 { | 93 { |
| 94 v8::Handle<v8::Object> holder = info.Holder(); | 94 v8::Handle<v8::Object> holder = info.Holder(); |
| 95 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "
TestNode", holder, info.GetIsolate()); | 95 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "
TestNode", holder, info.GetIsolate()); |
| 96 TestNode* impl = V8TestNode::toNative(holder); | 96 TestNode* impl = V8TestNode::toImpl(holder); |
| 97 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 97 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 98 impl->setHrefThrows(cppValue, exceptionState); | 98 impl->setHrefThrows(cppValue, exceptionState); |
| 99 exceptionState.throwIfNeeded(); | 99 exceptionState.throwIfNeeded(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 102 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 103 { | 103 { |
| 104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 105 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info); | 105 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info); |
| 106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 107 } | 107 } |
| 108 | 108 |
| 109 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 109 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 110 { | 110 { |
| 111 v8::Handle<v8::Object> holder = info.Holder(); | 111 v8::Handle<v8::Object> holder = info.Holder(); |
| 112 TestNode* impl = V8TestNode::toNative(holder); | 112 TestNode* impl = V8TestNode::toImpl(holder); |
| 113 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate()); | 113 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate()); |
| 114 } | 114 } |
| 115 | 115 |
| 116 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 116 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 117 { | 117 { |
| 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 119 TestNodeV8Internal::hrefCallWithAttributeGetter(info); | 119 TestNodeV8Internal::hrefCallWithAttributeGetter(info); |
| 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 121 } | 121 } |
| 122 | 122 |
| 123 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 123 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 124 { | 124 { |
| 125 v8::Handle<v8::Object> holder = info.Holder(); | 125 v8::Handle<v8::Object> holder = info.Holder(); |
| 126 TestNode* impl = V8TestNode::toNative(holder); | 126 TestNode* impl = V8TestNode::toImpl(holder); |
| 127 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 127 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 128 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 128 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 129 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); | 129 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); |
| 130 } | 130 } |
| 131 | 131 |
| 132 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 132 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 133 { | 133 { |
| 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 135 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info); | 135 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info); |
| 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 137 } | 137 } |
| 138 | 138 |
| 139 static void hrefByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 139 static void hrefByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 140 { | 140 { |
| 141 v8::Handle<v8::Object> holder = info.Holder(); | 141 v8::Handle<v8::Object> holder = info.Holder(); |
| 142 TestNode* impl = V8TestNode::toNative(holder); | 142 TestNode* impl = V8TestNode::toImpl(holder); |
| 143 v8SetReturnValueString(info, impl->hrefByteString(), info.GetIsolate()); | 143 v8SetReturnValueString(info, impl->hrefByteString(), info.GetIsolate()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 static void hrefByteStringAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 146 static void hrefByteStringAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 147 { | 147 { |
| 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 149 TestNodeV8Internal::hrefByteStringAttributeGetter(info); | 149 TestNodeV8Internal::hrefByteStringAttributeGetter(info); |
| 150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 151 } | 151 } |
| 152 | 152 |
| 153 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 153 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 154 { | 154 { |
| 155 v8::Handle<v8::Object> holder = info.Holder(); | 155 v8::Handle<v8::Object> holder = info.Holder(); |
| 156 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString
", "TestNode", holder, info.GetIsolate()); | 156 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString
", "TestNode", holder, info.GetIsolate()); |
| 157 TestNode* impl = V8TestNode::toNative(holder); | 157 TestNode* impl = V8TestNode::toImpl(holder); |
| 158 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | 158 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); |
| 159 impl->setHrefByteString(cppValue); | 159 impl->setHrefByteString(cppValue); |
| 160 } | 160 } |
| 161 | 161 |
| 162 static void hrefByteStringAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 162 static void hrefByteStringAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 163 { | 163 { |
| 164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 165 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info); | 165 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info); |
| 166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 167 } | 167 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 bool V8TestNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate
) | 226 bool V8TestNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate
) |
| 227 { | 227 { |
| 228 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 228 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 229 } | 229 } |
| 230 | 230 |
| 231 v8::Handle<v8::Object> V8TestNode::findInstanceInPrototypeChain(v8::Handle<v8::V
alue> v8Value, v8::Isolate* isolate) | 231 v8::Handle<v8::Object> V8TestNode::findInstanceInPrototypeChain(v8::Handle<v8::V
alue> v8Value, v8::Isolate* isolate) |
| 232 { | 232 { |
| 233 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 233 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 234 } | 234 } |
| 235 | 235 |
| 236 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8:
:Value> value) | 236 TestNode* V8TestNode::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::V
alue> value) |
| 237 { | 237 { |
| 238 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 238 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestNode>() : 0; |
| 239 } | 239 } |
| 240 | 240 |
| 241 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) | 241 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) |
| 242 { | 242 { |
| 243 return toNative(object); | 243 return toImpl(object); |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 void V8TestNode::refObject(ScriptWrappableBase* internalPointer) | 247 void V8TestNode::refObject(ScriptWrappableBase* internalPointer) |
| 248 { | 248 { |
| 249 #if !ENABLE(OILPAN) | 249 #if !ENABLE(OILPAN) |
| 250 fromInternalPointer(internalPointer)->ref(); | 250 internalPointer->toImpl<TestNode>()->ref(); |
| 251 #endif | 251 #endif |
| 252 } | 252 } |
| 253 | 253 |
| 254 void V8TestNode::derefObject(ScriptWrappableBase* internalPointer) | 254 void V8TestNode::derefObject(ScriptWrappableBase* internalPointer) |
| 255 { | 255 { |
| 256 #if !ENABLE(OILPAN) | 256 #if !ENABLE(OILPAN) |
| 257 fromInternalPointer(internalPointer)->deref(); | 257 internalPointer->toImpl<TestNode>()->deref(); |
| 258 #endif | 258 #endif |
| 259 } | 259 } |
| 260 | 260 |
| 261 WrapperPersistentNode* V8TestNode::createPersistentHandle(ScriptWrappableBase* i
nternalPointer) | 261 WrapperPersistentNode* V8TestNode::createPersistentHandle(ScriptWrappableBase* i
nternalPointer) |
| 262 { | 262 { |
| 263 #if ENABLE(OILPAN) | 263 #if ENABLE(OILPAN) |
| 264 return new WrapperPersistent<TestNode>(fromInternalPointer(internalPointer))
; | 264 return new WrapperPersistent<TestNode>(internalPointer->toImpl<TestNode>()); |
| 265 #else | 265 #else |
| 266 ASSERT_NOT_REACHED(); | 266 ASSERT_NOT_REACHED(); |
| 267 return 0; | 267 return 0; |
| 268 #endif | 268 #endif |
| 269 } | 269 } |
| 270 | 270 |
| 271 template<> | 271 template<> |
| 272 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) | 272 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) |
| 273 { | 273 { |
| 274 return toV8(impl, creationContext, isolate); | 274 return toV8(impl, creationContext, isolate); |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |