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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 65 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
66 { | 66 { |
67 v8::Handle<v8::Object> holder = info.Holder(); | 67 v8::Handle<v8::Object> holder = info.Holder(); |
68 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); | 68 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); |
69 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { | 69 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { |
70 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 70 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
71 exceptionState.throwIfNeeded(); | 71 exceptionState.throwIfNeeded(); |
72 return; | 72 return; |
73 } | 73 } |
74 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 74 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
75 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 75 TestInterfaceImplementation* cppValue = V8TestInterface::toImpl(v8::Handle<v
8::Object>::Cast(v8Value)); |
76 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 76 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
77 } | 77 } |
78 | 78 |
79 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 79 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
80 { | 80 { |
81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
82 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); | 82 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); |
83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
84 } | 84 } |
85 | 85 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 425 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
426 { | 426 { |
427 v8::Handle<v8::Object> holder = info.Holder(); | 427 v8::Handle<v8::Object> holder = info.Holder(); |
428 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); | 428 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); |
429 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { | 429 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { |
430 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 430 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
431 exceptionState.throwIfNeeded(); | 431 exceptionState.throwIfNeeded(); |
432 return; | 432 return; |
433 } | 433 } |
434 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 434 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
435 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 435 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value)); |
436 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); | 436 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); |
437 } | 437 } |
438 | 438 |
439 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 439 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
440 { | 440 { |
441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
442 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); | 442 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); |
443 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 443 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
444 } | 444 } |
445 | 445 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 490 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
491 { | 491 { |
492 v8::Handle<v8::Object> holder = info.Holder(); | 492 v8::Handle<v8::Object> holder = info.Holder(); |
493 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 493 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
494 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { | 494 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { |
495 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 495 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
496 exceptionState.throwIfNeeded(); | 496 exceptionState.throwIfNeeded(); |
497 return; | 497 return; |
498 } | 498 } |
499 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 499 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
500 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 500 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value)); |
501 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); | 501 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); |
502 } | 502 } |
503 | 503 |
504 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) | 504 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
505 { | 505 { |
506 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 506 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
507 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); | 507 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); |
508 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 508 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
509 } | 509 } |
510 | 510 |
(...skipping 14 matching lines...) Expand all Loading... |
525 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 525 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
526 { | 526 { |
527 v8::Handle<v8::Object> holder = info.Holder(); | 527 v8::Handle<v8::Object> holder = info.Holder(); |
528 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 528 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
529 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { | 529 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { |
530 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 530 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
531 exceptionState.throwIfNeeded(); | 531 exceptionState.throwIfNeeded(); |
532 return; | 532 return; |
533 } | 533 } |
534 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 534 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
535 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 535 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value)); |
536 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); | 536 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); |
537 } | 537 } |
538 | 538 |
539 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | 539 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
540 { | 540 { |
541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
542 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); | 542 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); |
543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
544 } | 544 } |
545 | 545 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArg", "TestInterface", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); | 982 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArg", "TestInterface", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); |
983 return; | 983 return; |
984 } | 984 } |
985 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 985 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
986 TestInterfaceEmpty* testInterfaceEmptyArg; | 986 TestInterfaceEmpty* testInterfaceEmptyArg; |
987 { | 987 { |
988 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { | 988 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { |
989 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestInterfaceEmptyArg", "TestInterface", "parameter 1 is not of type
'TestInterfaceEmpty'."), info.GetIsolate()); | 989 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestInterfaceEmptyArg", "TestInterface", "parameter 1 is not of type
'TestInterfaceEmpty'."), info.GetIsolate()); |
990 return; | 990 return; |
991 } | 991 } |
992 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 992 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje
ct>::Cast(info[0])); |
993 } | 993 } |
994 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 994 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
995 } | 995 } |
996 | 996 |
997 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 997 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
998 { | 998 { |
999 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 999 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1000 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod
(info); | 1000 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod
(info); |
1001 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1001 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1002 } | 1002 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1224 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1225 V8StringResource<> strArg; | 1225 V8StringResource<> strArg; |
1226 TestInterfaceEmpty* testInterfaceEmptyArg; | 1226 TestInterfaceEmpty* testInterfaceEmptyArg; |
1227 { | 1227 { |
1228 TOSTRING_VOID_INTERNAL(strArg, info[0]); | 1228 TOSTRING_VOID_INTERNAL(strArg, info[0]); |
1229 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf
o.GetIsolate())) { | 1229 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf
o.GetIsolate())) { |
1230 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 1230 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
1231 exceptionState.throwIfNeeded(); | 1231 exceptionState.throwIfNeeded(); |
1232 return; | 1232 return; |
1233 } | 1233 } |
1234 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); | 1234 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje
ct>::Cast(info[1])); |
1235 } | 1235 } |
1236 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 1236 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
1237 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); | 1237 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); |
1238 if (exceptionState.hadException()) { | 1238 if (exceptionState.hadException()) { |
1239 exceptionState.throwIfNeeded(); | 1239 exceptionState.throwIfNeeded(); |
1240 return; | 1240 return; |
1241 } | 1241 } |
1242 v8SetReturnValue(info, result.release()); | 1242 v8SetReturnValue(info, result.release()); |
1243 } | 1243 } |
1244 | 1244 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 | 2163 |
2164 ScriptState::Scope scope(scriptState); | 2164 ScriptState::Scope scope(scriptState); |
2165 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 2165 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
2166 | 2166 |
2167 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); | 2167 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); |
2168 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s
criptState->isolate(), cppValue)); | 2168 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s
criptState->isolate(), cppValue)); |
2169 } | 2169 } |
2170 | 2170 |
2171 } // namespace blink | 2171 } // namespace blink |
2172 #endif // ENABLE(CONDITION) | 2172 #endif // ENABLE(CONDITION) |
OLD | NEW |