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 "V8TestNode.h" | 7 #include "V8TestNode.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/V8DOMConfiguration.h" | 10 #include "bindings/core/v8/V8DOMConfiguration.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 90 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
91 { | 91 { |
92 v8::Local<v8::Object> holder = info.Holder(); | 92 v8::Local<v8::Object> holder = info.Holder(); |
93 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "
TestNode", holder, info.GetIsolate()); | 93 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "
TestNode", holder, info.GetIsolate()); |
94 TestNode* impl = V8TestNode::toImpl(holder); | 94 TestNode* impl = V8TestNode::toImpl(holder); |
95 V8StringResource<> cppValue = v8Value; | 95 V8StringResource<> cppValue = v8Value; |
96 if (!cppValue.prepare()) | 96 if (!cppValue.prepare()) |
97 return; | 97 return; |
98 impl->setHrefThrows(cppValue, exceptionState); | 98 impl->setHrefThrows(cppValue, exceptionState); |
99 exceptionState.throwIfNeeded(); | |
100 } | 99 } |
101 | 100 |
102 static void hrefThrowsAttributeSetterCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 101 static void hrefThrowsAttributeSetterCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
103 { | 102 { |
104 v8::Local<v8::Value> v8Value = info[0]; | 103 v8::Local<v8::Value> v8Value = info[0]; |
105 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info); | 104 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info); |
106 } | 105 } |
107 | 106 |
108 static void hrefCallWithAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) | 107 static void hrefCallWithAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) |
109 { | 108 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 { | 144 { |
146 TestNodeV8Internal::hrefByteStringAttributeGetter(info); | 145 TestNodeV8Internal::hrefByteStringAttributeGetter(info); |
147 } | 146 } |
148 | 147 |
149 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 148 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
150 { | 149 { |
151 v8::Local<v8::Object> holder = info.Holder(); | 150 v8::Local<v8::Object> holder = info.Holder(); |
152 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString
", "TestNode", holder, info.GetIsolate()); | 151 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString
", "TestNode", holder, info.GetIsolate()); |
153 TestNode* impl = V8TestNode::toImpl(holder); | 152 TestNode* impl = V8TestNode::toImpl(holder); |
154 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); | 153 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); |
155 if (exceptionState.throwIfNeeded()) | 154 if (exceptionState.hadException()) |
156 return; | 155 return; |
157 impl->setHrefByteString(cppValue); | 156 impl->setHrefByteString(cppValue); |
158 } | 157 } |
159 | 158 |
160 static void hrefByteStringAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 159 static void hrefByteStringAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
161 { | 160 { |
162 v8::Local<v8::Value> v8Value = info[0]; | 161 v8::Local<v8::Value> v8Value = info[0]; |
163 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info); | 162 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info); |
164 } | 163 } |
165 | 164 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 { | 224 { |
226 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 225 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
227 } | 226 } |
228 | 227 |
229 TestNode* V8TestNode::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Va
lue> value) | 228 TestNode* V8TestNode::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Va
lue> value) |
230 { | 229 { |
231 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 230 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
232 } | 231 } |
233 | 232 |
234 } // namespace blink | 233 } // namespace blink |
OLD | NEW |