| 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 "V8TestInterfacePartial.h" | 7 #include "V8TestInterfacePartial.h" |
| 8 | 8 |
| 9 #if ENABLE(CONDITION) | 9 #if ENABLE(CONDITION) |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/PrivateScriptRunner.h" | 11 #include "bindings/core/v8/PrivateScriptRunner.h" |
| 12 #include "bindings/core/v8/ScriptPromise.h" | 12 #include "bindings/core/v8/ScriptPromise.h" |
| 13 #include "bindings/core/v8/V8DOMConfiguration.h" | 13 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 14 #include "bindings/core/v8/V8Document.h" | 14 #include "bindings/core/v8/V8Document.h" |
| 15 #include "bindings/core/v8/V8Node.h" | 15 #include "bindings/core/v8/V8Node.h" |
| 16 #include "bindings/core/v8/V8ObjectConstructor.h" | 16 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 17 #include "bindings/core/v8/V8TestInterface.h" | 17 #include "bindings/core/v8/V8TestInterface.h" |
| 18 #include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h" | 18 #include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h" |
| 19 #include "core/dom/ContextFeatures.h" | 19 #include "core/dom/ContextFeatures.h" |
| 20 #include "core/dom/Document.h" | 20 #include "core/dom/Document.h" |
| 21 #include "core/experiments/ExperimentalFeatures.h" |
| 21 #include "core/frame/LocalFrame.h" | 22 #include "core/frame/LocalFrame.h" |
| 23 #include "core/inspector/ConsoleMessage.h" |
| 22 #include "platform/RuntimeEnabledFeatures.h" | 24 #include "platform/RuntimeEnabledFeatures.h" |
| 23 #include "platform/ScriptForbiddenScope.h" | 25 #include "platform/ScriptForbiddenScope.h" |
| 24 #include "platform/TraceEvent.h" | 26 #include "platform/TraceEvent.h" |
| 25 #include "wtf/GetPtr.h" | 27 #include "wtf/GetPtr.h" |
| 26 #include "wtf/RefPtr.h" | 28 #include "wtf/RefPtr.h" |
| 27 #include "wtf/build_config.h" | 29 #include "wtf/build_config.h" |
| 28 | 30 |
| 29 namespace blink { | 31 namespace blink { |
| 30 | 32 |
| 31 namespace TestInterfaceImplementationPartialV8Internal { | 33 namespace TestInterfaceImplementationPartialV8Internal { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 exceptionState.throwIfNeeded(); | 240 exceptionState.throwIfNeeded(); |
| 239 return; | 241 return; |
| 240 } | 242 } |
| 241 } | 243 } |
| 242 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 244 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im
pl, arg); |
| 243 } | 245 } |
| 244 | 246 |
| 245 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 247 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 246 { | 248 { |
| 247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 249 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 248 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 250 String errorMessage; |
| 251 if (!ExperimentalFeatures::featureNameEnabled(currentExecutionContext(info.G
etIsolate()), errorMessage)) { |
| 252 v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| 253 Document& document = *toDocument(currentExecutionContext(info.GetIsolat
e())); |
| 254 document.addConsoleMessage(ConsoleMessage::create(JSMessageSource, Erro
rMessageLevel, errorMessage)); |
| 255 return; |
| 256 } TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModule
sArgMethodMethod(info); |
| 249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 257 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 250 } | 258 } |
| 251 | 259 |
| 252 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 260 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 253 { | 261 { |
| 254 V8StringResource<> value; | 262 V8StringResource<> value; |
| 255 { | 263 { |
| 256 value = info[0]; | 264 value = info[0]; |
| 257 if (!value.prepare()) | 265 if (!value.prepare()) |
| 258 return; | 266 return; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 282 | 290 |
| 283 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 291 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 284 { | 292 { |
| 285 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 293 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 286 TestPartialInterfaceImplementation3::unscopeableVoidMethod(*impl); | 294 TestPartialInterfaceImplementation3::unscopeableVoidMethod(*impl); |
| 287 } | 295 } |
| 288 | 296 |
| 289 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 297 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 290 { | 298 { |
| 291 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 292 TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(in
fo); | 300 String errorMessage; |
| 301 if (!ExperimentalFeatures::featureNameEnabled(currentExecutionContext(info.G
etIsolate()), errorMessage)) { |
| 302 v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| 303 Document& document = *toDocument(currentExecutionContext(info.GetIsolat
e())); |
| 304 document.addConsoleMessage(ConsoleMessage::create(JSMessageSource, Erro
rMessageLevel, errorMessage)); |
| 305 return; |
| 306 } TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMeth
od(info); |
| 293 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 307 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 294 } | 308 } |
| 295 | 309 |
| 296 } // namespace TestInterfaceImplementationPartialV8Internal | 310 } // namespace TestInterfaceImplementationPartialV8Internal |
| 297 | 311 |
| 298 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { | 312 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { |
| 299 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, | 313 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| 300 {"unscopeableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsc
opeableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}, | 314 {"unscopeableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsc
opeableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}, |
| 301 }; | 315 }; |
| 302 | 316 |
| 303 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) | 317 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi
onTemplate> functionTemplate, v8::Isolate* isolate) |
| 304 { | 318 { |
| 305 V8TestInterface::installV8TestInterfaceTemplate(functionTemplate, isolate); | 319 V8TestInterface::installV8TestInterfaceTemplate(functionTemplate, isolate); |
| 306 | 320 |
| 307 v8::Local<v8::Signature> defaultSignature; | 321 v8::Local<v8::Signature> defaultSignature; |
| 308 if (!RuntimeEnabledFeatures::featureNameEnabled()) | 322 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterfac
e::internalFieldCount, |
| 309 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInte
rface::internalFieldCount, 0, 0, 0, 0, 0, 0); | 323 0, 0, |
| 310 else | 324 0, 0, |
| 311 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInte
rface::internalFieldCount, | 325 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); |
| 312 0, 0, | |
| 313 0, 0, | |
| 314 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); | |
| 315 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 326 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 316 ALLOW_UNUSED_LOCAL(instanceTemplate); | 327 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 317 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 328 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 318 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 329 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 319 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] =
{ | 330 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] =
{ |
| 320 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsign
edShort}, | 331 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsign
edShort}, |
| 321 }; | 332 }; |
| 322 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); | 333 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); |
| 323 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); | 334 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); |
| 324 } | 335 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 346 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 357 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
| 347 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 358 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
| 348 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 359 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
| 349 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 360 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
| 350 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 361 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
| 351 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 362 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
| 352 } | 363 } |
| 353 | 364 |
| 354 } // namespace blink | 365 } // namespace blink |
| 355 #endif // ENABLE(CONDITION) | 366 #endif // ENABLE(CONDITION) |
| OLD | NEW |