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 "V8TestInterfaceOriginTrialEnabled.h" | 7 #include "V8TestInterfaceOriginTrialEnabled.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/GeneratedCodeHelper.h" | 10 #include "bindings/core/v8/GeneratedCodeHelper.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 v8SetReturnValueInt(info, TestInterfaceOriginTrialEnabled::staticConditional
ReadOnlyLongAttribute()); | 147 v8SetReturnValueInt(info, TestInterfaceOriginTrialEnabled::staticConditional
ReadOnlyLongAttribute()); |
148 } | 148 } |
149 | 149 |
150 void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 150 void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
151 { | 151 { |
152 TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttr
ibuteAttributeGetter(info); | 152 TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttr
ibuteAttributeGetter(info); |
153 } | 153 } |
154 | 154 |
155 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 155 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
156 { | 156 { |
157 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIso
late()); | 157 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterfaceOriginTrialEnabled", "voidMethodDoubleArgFloatArg"); |
| 158 |
| 159 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
| 160 |
158 if (UNLIKELY(info.Length() < 2)) { | 161 if (UNLIKELY(info.Length() < 2)) { |
159 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 162 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
160 return; | 163 return; |
161 } | 164 } |
162 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 165 |
163 double doubleArg; | 166 double doubleArg; |
164 float floatArg; | 167 float floatArg; |
165 { | 168 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
166 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 169 if (exceptionState.hadException()) |
167 if (exceptionState.hadException()) | 170 return; |
168 return; | 171 |
169 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; | 172 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); |
170 if (exceptionState.hadException()) | 173 if (exceptionState.hadException()) |
171 return; | 174 return; |
172 } | 175 |
173 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 176 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
174 } | 177 } |
175 | 178 |
176 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 179 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
177 { | 180 { |
178 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod
(info); | 181 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod
(info); |
179 } | 182 } |
180 | 183 |
181 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 184 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
182 { | 185 { |
183 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 186 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
| 187 |
184 impl->voidMethodPartialOverload(); | 188 impl->voidMethodPartialOverload(); |
185 } | 189 } |
186 | 190 |
187 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 191 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
188 { | 192 { |
189 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); | 193 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterfaceOriginTrialEnabled", "voidMethodPartialOverload"); |
| 194 |
190 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 195 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
| 196 |
191 double doubleArg; | 197 double doubleArg; |
192 { | 198 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
193 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 199 if (exceptionState.hadException()) |
194 if (exceptionState.hadException()) | 200 return; |
195 return; | 201 |
196 } | |
197 impl->voidMethodPartialOverload(doubleArg); | 202 impl->voidMethodPartialOverload(doubleArg); |
198 } | 203 } |
199 | 204 |
200 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 205 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
201 { | 206 { |
202 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); | 207 bool isArityError = false; |
203 switch (std::min(1, info.Length())) { | 208 switch (std::min(1, info.Length())) { |
204 case 0: | 209 case 0: |
205 if (true) { | 210 if (true) { |
206 voidMethodPartialOverload1Method(info); | 211 voidMethodPartialOverload1Method(info); |
207 return; | 212 return; |
208 } | 213 } |
209 break; | 214 break; |
210 case 1: | 215 case 1: |
211 if (true) { | 216 if (true) { |
212 voidMethodPartialOverload2Method(info); | 217 voidMethodPartialOverload2Method(info); |
213 return; | 218 return; |
214 } | 219 } |
215 break; | 220 break; |
216 default: | 221 default: |
217 break; | 222 isArityError = true; |
| 223 } |
| 224 |
| 225 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterfaceOriginTrialEnabled", "voidMethodPartialOverload"); |
| 226 |
| 227 if (isArityError) { |
218 } | 228 } |
219 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 229 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
220 return; | |
221 } | 230 } |
222 | 231 |
223 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 232 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
224 { | 233 { |
225 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(i
nfo); | 234 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(i
nfo); |
226 } | 235 } |
227 | 236 |
228 } // namespace TestInterfaceOriginTrialEnabledV8Internal | 237 } // namespace TestInterfaceOriginTrialEnabledV8Internal |
229 | 238 |
230 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTrialEnable
dAccessors[] = { | 239 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTrialEnable
dAccessors[] = { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 { | 294 { |
286 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 295 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
287 } | 296 } |
288 | 297 |
289 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy
peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) | 298 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy
peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
290 { | 299 { |
291 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 300 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
292 } | 301 } |
293 | 302 |
294 } // namespace blink | 303 } // namespace blink |
OLD | NEW |