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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 10683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10694 ScriptState* scriptState = ScriptState::from(context); | 10694 ScriptState* scriptState = ScriptState::from(context); |
10695 if (!scriptState->executionContext()) | 10695 if (!scriptState->executionContext()) |
10696 return false; | 10696 return false; |
10697 | 10697 |
10698 ScriptState::Scope scope(scriptState); | 10698 ScriptState::Scope scope(scriptState); |
10699 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10699 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10700 | 10700 |
10701 v8::Handle<v8::Value> *argv = 0; | 10701 v8::Handle<v8::Value> *argv = 0; |
10702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); | 10702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); |
10703 v8::TryCatch block; | 10703 v8::TryCatch block; |
| 10704 #ifndef NDEBUG |
| 10705 block.SetVerbose(true); |
| 10706 #endif |
10704 V8RethrowTryCatchScope rethrow(block); | 10707 V8RethrowTryCatchScope rethrow(block); |
10705 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); | 10708 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); |
10706 if (block.HasCaught()) { | 10709 if (block.HasCaught()) { |
10707 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); | 10710 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); |
10708 return false; | 10711 return false; |
10709 } | 10712 } |
10710 return true; | 10713 return true; |
10711 } | 10714 } |
10712 | 10715 |
10713 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) | 10716 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) |
10714 { | 10717 { |
10715 if (!frame) | 10718 if (!frame) |
10716 return false; | 10719 return false; |
10717 v8::HandleScope handleScope(toIsolate(frame)); | 10720 v8::HandleScope handleScope(toIsolate(frame)); |
10718 ScriptForbiddenScope::AllowUserAgentScript script; | 10721 ScriptForbiddenScope::AllowUserAgentScript script; |
10719 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10722 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10720 if (context.IsEmpty()) | 10723 if (context.IsEmpty()) |
10721 return false; | 10724 return false; |
10722 ScriptState* scriptState = ScriptState::from(context); | 10725 ScriptState* scriptState = ScriptState::from(context); |
10723 if (!scriptState->executionContext()) | 10726 if (!scriptState->executionContext()) |
10724 return false; | 10727 return false; |
10725 | 10728 |
10726 ScriptState::Scope scope(scriptState); | 10729 ScriptState::Scope scope(scriptState); |
10727 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10730 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10728 | 10731 |
10729 v8::Handle<v8::Value> *argv = 0; | 10732 v8::Handle<v8::Value> *argv = 0; |
10730 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); | 10733 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); |
10731 v8::TryCatch block; | 10734 v8::TryCatch block; |
| 10735 #ifndef NDEBUG |
| 10736 block.SetVerbose(true); |
| 10737 #endif |
10732 V8RethrowTryCatchScope rethrow(block); | 10738 V8RethrowTryCatchScope rethrow(block); |
10733 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); | 10739 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); |
10734 if (block.HasCaught()) { | 10740 if (block.HasCaught()) { |
10735 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10741 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10736 // FIXME: We should support exceptions other than DOM exceptions. | 10742 // FIXME: We should support exceptions other than DOM exceptions. |
10737 RELEASE_ASSERT_NOT_REACHED(); | 10743 RELEASE_ASSERT_NOT_REACHED(); |
10738 } | 10744 } |
10739 return false; | 10745 return false; |
10740 } | 10746 } |
10741 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10747 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
(...skipping 15 matching lines...) Expand all Loading... |
10757 if (!scriptState->executionContext()) | 10763 if (!scriptState->executionContext()) |
10758 return false; | 10764 return false; |
10759 | 10765 |
10760 ScriptState::Scope scope(scriptState); | 10766 ScriptState::Scope scope(scriptState); |
10761 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10767 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10762 | 10768 |
10763 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 10769 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
10764 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10770 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10765 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); | 10771 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); |
10766 v8::TryCatch block; | 10772 v8::TryCatch block; |
| 10773 #ifndef NDEBUG |
| 10774 block.SetVerbose(true); |
| 10775 #endif |
10767 V8RethrowTryCatchScope rethrow(block); | 10776 V8RethrowTryCatchScope rethrow(block); |
10768 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde
r, 1, argv); | 10777 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde
r, 1, argv); |
10769 if (block.HasCaught()) { | 10778 if (block.HasCaught()) { |
10770 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10779 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10771 // FIXME: We should support exceptions other than DOM exceptions. | 10780 // FIXME: We should support exceptions other than DOM exceptions. |
10772 RELEASE_ASSERT_NOT_REACHED(); | 10781 RELEASE_ASSERT_NOT_REACHED(); |
10773 } | 10782 } |
10774 return false; | 10783 return false; |
10775 } | 10784 } |
10776 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10785 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
(...skipping 15 matching lines...) Expand all Loading... |
10792 if (!scriptState->executionContext()) | 10801 if (!scriptState->executionContext()) |
10793 return false; | 10802 return false; |
10794 | 10803 |
10795 ScriptState::Scope scope(scriptState); | 10804 ScriptState::Scope scope(scriptState); |
10796 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10805 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10797 | 10806 |
10798 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); | 10807 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); |
10799 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10808 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10800 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | 10809 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); |
10801 v8::TryCatch block; | 10810 v8::TryCatch block; |
| 10811 #ifndef NDEBUG |
| 10812 block.SetVerbose(true); |
| 10813 #endif |
10802 V8RethrowTryCatchScope rethrow(block); | 10814 V8RethrowTryCatchScope rethrow(block); |
10803 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol
der, 1, argv); | 10815 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol
der, 1, argv); |
10804 if (block.HasCaught()) { | 10816 if (block.HasCaught()) { |
10805 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10817 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10806 // FIXME: We should support exceptions other than DOM exceptions. | 10818 // FIXME: We should support exceptions other than DOM exceptions. |
10807 RELEASE_ASSERT_NOT_REACHED(); | 10819 RELEASE_ASSERT_NOT_REACHED(); |
10808 } | 10820 } |
10809 return false; | 10821 return false; |
10810 } | 10822 } |
10811 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 10823 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
(...skipping 15 matching lines...) Expand all Loading... |
10827 if (!scriptState->executionContext()) | 10839 if (!scriptState->executionContext()) |
10828 return false; | 10840 return false; |
10829 | 10841 |
10830 ScriptState::Scope scope(scriptState); | 10842 ScriptState::Scope scope(scriptState); |
10831 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10843 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10832 | 10844 |
10833 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); | 10845 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); |
10834 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10846 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10835 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); | 10847 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); |
10836 v8::TryCatch block; | 10848 v8::TryCatch block; |
| 10849 #ifndef NDEBUG |
| 10850 block.SetVerbose(true); |
| 10851 #endif |
10837 V8RethrowTryCatchScope rethrow(block); | 10852 V8RethrowTryCatchScope rethrow(block); |
10838 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); | 10853 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); |
10839 if (block.HasCaught()) { | 10854 if (block.HasCaught()) { |
10840 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10855 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10841 // FIXME: We should support exceptions other than DOM exceptions. | 10856 // FIXME: We should support exceptions other than DOM exceptions. |
10842 RELEASE_ASSERT_NOT_REACHED(); | 10857 RELEASE_ASSERT_NOT_REACHED(); |
10843 } | 10858 } |
10844 return false; | 10859 return false; |
10845 } | 10860 } |
10846 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10861 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
(...skipping 19 matching lines...) Expand all Loading... |
10866 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10881 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10867 | 10882 |
10868 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context()
->Global(), scriptState->isolate()); | 10883 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context()
->Global(), scriptState->isolate()); |
10869 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global
(), scriptState->isolate()); | 10884 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global
(), scriptState->isolate()); |
10870 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | 10885 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); |
10871 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(),
value2); | 10886 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(),
value2); |
10872 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); | 10887 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); |
10873 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; | 10888 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; |
10874 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | 10889 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); |
10875 v8::TryCatch block; | 10890 v8::TryCatch block; |
| 10891 #ifndef NDEBUG |
| 10892 block.SetVerbose(true); |
| 10893 #endif |
10876 V8RethrowTryCatchScope rethrow(block); | 10894 V8RethrowTryCatchScope rethrow(block); |
10877 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); | 10895 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); |
10878 if (block.HasCaught()) { | 10896 if (block.HasCaught()) { |
10879 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10897 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10880 // FIXME: We should support exceptions other than DOM exceptions. | 10898 // FIXME: We should support exceptions other than DOM exceptions. |
10881 RELEASE_ASSERT_NOT_REACHED(); | 10899 RELEASE_ASSERT_NOT_REACHED(); |
10882 } | 10900 } |
10883 return false; | 10901 return false; |
10884 } | 10902 } |
10885 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10903 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
(...skipping 16 matching lines...) Expand all Loading... |
10902 return false; | 10920 return false; |
10903 | 10921 |
10904 ScriptState::Scope scope(scriptState); | 10922 ScriptState::Scope scope(scriptState); |
10905 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10923 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10906 | 10924 |
10907 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | 10925 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); |
10908 v8::Handle<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate()
, value2); | 10926 v8::Handle<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate()
, value2); |
10909 v8::Handle<v8::Value> argv[] = { value1Handle, value2Handle }; | 10927 v8::Handle<v8::Value> argv[] = { value1Handle, value2Handle }; |
10910 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 10928 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
10911 v8::TryCatch block; | 10929 v8::TryCatch block; |
| 10930 #ifndef NDEBUG |
| 10931 block.SetVerbose(true); |
| 10932 #endif |
10912 V8RethrowTryCatchScope rethrow(block); | 10933 V8RethrowTryCatchScope rethrow(block); |
10913 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); | 10934 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); |
10914 if (block.HasCaught()) { | 10935 if (block.HasCaught()) { |
10915 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10936 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10916 // FIXME: We should support exceptions other than DOM exceptions. | 10937 // FIXME: We should support exceptions other than DOM exceptions. |
10917 RELEASE_ASSERT_NOT_REACHED(); | 10938 RELEASE_ASSERT_NOT_REACHED(); |
10918 } | 10939 } |
10919 return false; | 10940 return false; |
10920 } | 10941 } |
10921 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10942 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
(...skipping 13 matching lines...) Expand all Loading... |
10935 return false; | 10956 return false; |
10936 ScriptState* scriptState = ScriptState::from(context); | 10957 ScriptState* scriptState = ScriptState::from(context); |
10937 if (!scriptState->executionContext()) | 10958 if (!scriptState->executionContext()) |
10938 return false; | 10959 return false; |
10939 | 10960 |
10940 ScriptState::Scope scope(scriptState); | 10961 ScriptState::Scope scope(scriptState); |
10941 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10962 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10942 | 10963 |
10943 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); | 10964 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); |
10944 v8::TryCatch block; | 10965 v8::TryCatch block; |
| 10966 #ifndef NDEBUG |
| 10967 block.SetVerbose(true); |
| 10968 #endif |
10945 V8RethrowTryCatchScope rethrow(block); | 10969 V8RethrowTryCatchScope rethrow(block); |
10946 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "readonlyShortAttribute", holder); | 10970 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "readonlyShortAttribute", holder); |
10947 if (block.HasCaught()) { | 10971 if (block.HasCaught()) { |
10948 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10972 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10949 // FIXME: We should support exceptions other than DOM exceptions. | 10973 // FIXME: We should support exceptions other than DOM exceptions. |
10950 RELEASE_ASSERT_NOT_REACHED(); | 10974 RELEASE_ASSERT_NOT_REACHED(); |
10951 } | 10975 } |
10952 return false; | 10976 return false; |
10953 } | 10977 } |
10954 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10978 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
(...skipping 13 matching lines...) Expand all Loading... |
10968 return false; | 10992 return false; |
10969 ScriptState* scriptState = ScriptState::from(context); | 10993 ScriptState* scriptState = ScriptState::from(context); |
10970 if (!scriptState->executionContext()) | 10994 if (!scriptState->executionContext()) |
10971 return false; | 10995 return false; |
10972 | 10996 |
10973 ScriptState::Scope scope(scriptState); | 10997 ScriptState::Scope scope(scriptState); |
10974 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10998 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10975 | 10999 |
10976 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11000 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
10977 v8::TryCatch block; | 11001 v8::TryCatch block; |
| 11002 #ifndef NDEBUG |
| 11003 block.SetVerbose(true); |
| 11004 #endif |
10978 V8RethrowTryCatchScope rethrow(block); | 11005 V8RethrowTryCatchScope rethrow(block); |
10979 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "shortAttribute", holder); | 11006 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "shortAttribute", holder); |
10980 if (block.HasCaught()) { | 11007 if (block.HasCaught()) { |
10981 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11008 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10982 // FIXME: We should support exceptions other than DOM exceptions. | 11009 // FIXME: We should support exceptions other than DOM exceptions. |
10983 RELEASE_ASSERT_NOT_REACHED(); | 11010 RELEASE_ASSERT_NOT_REACHED(); |
10984 } | 11011 } |
10985 return false; | 11012 return false; |
10986 } | 11013 } |
10987 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 11014 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
(...skipping 13 matching lines...) Expand all Loading... |
11001 return false; | 11028 return false; |
11002 ScriptState* scriptState = ScriptState::from(context); | 11029 ScriptState* scriptState = ScriptState::from(context); |
11003 if (!scriptState->executionContext()) | 11030 if (!scriptState->executionContext()) |
11004 return false; | 11031 return false; |
11005 | 11032 |
11006 ScriptState::Scope scope(scriptState); | 11033 ScriptState::Scope scope(scriptState); |
11007 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11034 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11008 | 11035 |
11009 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11036 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11010 v8::TryCatch block; | 11037 v8::TryCatch block; |
| 11038 #ifndef NDEBUG |
| 11039 block.SetVerbose(true); |
| 11040 #endif |
11011 V8RethrowTryCatchScope rethrow(block); | 11041 V8RethrowTryCatchScope rethrow(block); |
11012 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); | 11042 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); |
11013 if (block.HasCaught()) { | 11043 if (block.HasCaught()) { |
11014 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11044 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11015 // FIXME: We should support exceptions other than DOM exceptions. | 11045 // FIXME: We should support exceptions other than DOM exceptions. |
11016 RELEASE_ASSERT_NOT_REACHED(); | 11046 RELEASE_ASSERT_NOT_REACHED(); |
11017 } | 11047 } |
11018 return false; | 11048 return false; |
11019 } | 11049 } |
11020 return true; | 11050 return true; |
(...skipping 10 matching lines...) Expand all Loading... |
11031 return false; | 11061 return false; |
11032 ScriptState* scriptState = ScriptState::from(context); | 11062 ScriptState* scriptState = ScriptState::from(context); |
11033 if (!scriptState->executionContext()) | 11063 if (!scriptState->executionContext()) |
11034 return false; | 11064 return false; |
11035 | 11065 |
11036 ScriptState::Scope scope(scriptState); | 11066 ScriptState::Scope scope(scriptState); |
11037 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11067 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11038 | 11068 |
11039 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11069 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11040 v8::TryCatch block; | 11070 v8::TryCatch block; |
| 11071 #ifndef NDEBUG |
| 11072 block.SetVerbose(true); |
| 11073 #endif |
11041 V8RethrowTryCatchScope rethrow(block); | 11074 V8RethrowTryCatchScope rethrow(block); |
11042 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "stringAttribute", holder); | 11075 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "stringAttribute", holder); |
11043 if (block.HasCaught()) { | 11076 if (block.HasCaught()) { |
11044 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11077 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11045 // FIXME: We should support exceptions other than DOM exceptions. | 11078 // FIXME: We should support exceptions other than DOM exceptions. |
11046 RELEASE_ASSERT_NOT_REACHED(); | 11079 RELEASE_ASSERT_NOT_REACHED(); |
11047 } | 11080 } |
11048 return false; | 11081 return false; |
11049 } | 11082 } |
11050 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11083 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
(...skipping 13 matching lines...) Expand all Loading... |
11064 return false; | 11097 return false; |
11065 ScriptState* scriptState = ScriptState::from(context); | 11098 ScriptState* scriptState = ScriptState::from(context); |
11066 if (!scriptState->executionContext()) | 11099 if (!scriptState->executionContext()) |
11067 return false; | 11100 return false; |
11068 | 11101 |
11069 ScriptState::Scope scope(scriptState); | 11102 ScriptState::Scope scope(scriptState); |
11070 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11103 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11071 | 11104 |
11072 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11105 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11073 v8::TryCatch block; | 11106 v8::TryCatch block; |
| 11107 #ifndef NDEBUG |
| 11108 block.SetVerbose(true); |
| 11109 #endif |
11074 V8RethrowTryCatchScope rethrow(block); | 11110 V8RethrowTryCatchScope rethrow(block); |
11075 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); | 11111 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); |
11076 if (block.HasCaught()) { | 11112 if (block.HasCaught()) { |
11077 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11113 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11078 // FIXME: We should support exceptions other than DOM exceptions. | 11114 // FIXME: We should support exceptions other than DOM exceptions. |
11079 RELEASE_ASSERT_NOT_REACHED(); | 11115 RELEASE_ASSERT_NOT_REACHED(); |
11080 } | 11116 } |
11081 return false; | 11117 return false; |
11082 } | 11118 } |
11083 return true; | 11119 return true; |
(...skipping 10 matching lines...) Expand all Loading... |
11094 return false; | 11130 return false; |
11095 ScriptState* scriptState = ScriptState::from(context); | 11131 ScriptState* scriptState = ScriptState::from(context); |
11096 if (!scriptState->executionContext()) | 11132 if (!scriptState->executionContext()) |
11097 return false; | 11133 return false; |
11098 | 11134 |
11099 ScriptState::Scope scope(scriptState); | 11135 ScriptState::Scope scope(scriptState); |
11100 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11136 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11101 | 11137 |
11102 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11138 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11103 v8::TryCatch block; | 11139 v8::TryCatch block; |
| 11140 #ifndef NDEBUG |
| 11141 block.SetVerbose(true); |
| 11142 #endif |
11104 V8RethrowTryCatchScope rethrow(block); | 11143 V8RethrowTryCatchScope rethrow(block); |
11105 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); | 11144 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); |
11106 if (block.HasCaught()) { | 11145 if (block.HasCaught()) { |
11107 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11146 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11108 // FIXME: We should support exceptions other than DOM exceptions. | 11147 // FIXME: We should support exceptions other than DOM exceptions. |
11109 RELEASE_ASSERT_NOT_REACHED(); | 11148 RELEASE_ASSERT_NOT_REACHED(); |
11110 } | 11149 } |
11111 return false; | 11150 return false; |
11112 } | 11151 } |
11113 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11152 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
(...skipping 13 matching lines...) Expand all Loading... |
11127 return false; | 11166 return false; |
11128 ScriptState* scriptState = ScriptState::from(context); | 11167 ScriptState* scriptState = ScriptState::from(context); |
11129 if (!scriptState->executionContext()) | 11168 if (!scriptState->executionContext()) |
11130 return false; | 11169 return false; |
11131 | 11170 |
11132 ScriptState::Scope scope(scriptState); | 11171 ScriptState::Scope scope(scriptState); |
11133 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11172 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11134 | 11173 |
11135 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11174 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11136 v8::TryCatch block; | 11175 v8::TryCatch block; |
| 11176 #ifndef NDEBUG |
| 11177 block.SetVerbose(true); |
| 11178 #endif |
11137 V8RethrowTryCatchScope rethrow(block); | 11179 V8RethrowTryCatchScope rethrow(block); |
11138 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); | 11180 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); |
11139 if (block.HasCaught()) { | 11181 if (block.HasCaught()) { |
11140 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11182 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11141 // FIXME: We should support exceptions other than DOM exceptions. | 11183 // FIXME: We should support exceptions other than DOM exceptions. |
11142 RELEASE_ASSERT_NOT_REACHED(); | 11184 RELEASE_ASSERT_NOT_REACHED(); |
11143 } | 11185 } |
11144 return false; | 11186 return false; |
11145 } | 11187 } |
11146 return true; | 11188 return true; |
(...skipping 10 matching lines...) Expand all Loading... |
11157 return false; | 11199 return false; |
11158 ScriptState* scriptState = ScriptState::from(context); | 11200 ScriptState* scriptState = ScriptState::from(context); |
11159 if (!scriptState->executionContext()) | 11201 if (!scriptState->executionContext()) |
11160 return false; | 11202 return false; |
11161 | 11203 |
11162 ScriptState::Scope scope(scriptState); | 11204 ScriptState::Scope scope(scriptState); |
11163 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11205 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11164 | 11206 |
11165 ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 11207 ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
11166 v8::TryCatch block; | 11208 v8::TryCatch block; |
| 11209 #ifndef NDEBUG |
| 11210 block.SetVerbose(true); |
| 11211 #endif |
11167 V8RethrowTryCatchScope rethrow(block); | 11212 V8RethrowTryCatchScope rethrow(block); |
11168 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "attributeForPrivateScriptOnly", holder); | 11213 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "attributeForPrivateScriptOnly", holder); |
11169 if (block.HasCaught()) { | 11214 if (block.HasCaught()) { |
11170 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11215 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11171 // FIXME: We should support exceptions other than DOM exceptions. | 11216 // FIXME: We should support exceptions other than DOM exceptions. |
11172 RELEASE_ASSERT_NOT_REACHED(); | 11217 RELEASE_ASSERT_NOT_REACHED(); |
11173 } | 11218 } |
11174 return false; | 11219 return false; |
11175 } | 11220 } |
11176 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11221 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
(...skipping 13 matching lines...) Expand all Loading... |
11190 return false; | 11235 return false; |
11191 ScriptState* scriptState = ScriptState::from(context); | 11236 ScriptState* scriptState = ScriptState::from(context); |
11192 if (!scriptState->executionContext()) | 11237 if (!scriptState->executionContext()) |
11193 return false; | 11238 return false; |
11194 | 11239 |
11195 ScriptState::Scope scope(scriptState); | 11240 ScriptState::Scope scope(scriptState); |
11196 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11241 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11197 | 11242 |
11198 ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 11243 ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
11199 v8::TryCatch block; | 11244 v8::TryCatch block; |
| 11245 #ifndef NDEBUG |
| 11246 block.SetVerbose(true); |
| 11247 #endif |
11200 V8RethrowTryCatchScope rethrow(block); | 11248 V8RethrowTryCatchScope rethrow(block); |
11201 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "attri
buteForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); | 11249 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "attri
buteForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); |
11202 if (block.HasCaught()) { | 11250 if (block.HasCaught()) { |
11203 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11251 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11204 // FIXME: We should support exceptions other than DOM exceptions. | 11252 // FIXME: We should support exceptions other than DOM exceptions. |
11205 RELEASE_ASSERT_NOT_REACHED(); | 11253 RELEASE_ASSERT_NOT_REACHED(); |
11206 } | 11254 } |
11207 return false; | 11255 return false; |
11208 } | 11256 } |
11209 return true; | 11257 return true; |
11210 } | 11258 } |
11211 | 11259 |
11212 } // namespace blink | 11260 } // namespace blink |
OLD | NEW |