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 10736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10747 return false; | 10747 return false; |
10748 | 10748 |
10749 ScriptState::Scope scope(scriptState); | 10749 ScriptState::Scope scope(scriptState); |
10750 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10750 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10751 | 10751 |
10752 v8::Handle<v8::Value> *argv = 0; | 10752 v8::Handle<v8::Value> *argv = 0; |
10753 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); | 10753 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); |
10754 v8::TryCatch block; | 10754 v8::TryCatch block; |
10755 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); | 10755 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); |
10756 if (block.HasCaught()) { | 10756 if (block.HasCaught()) { |
10757 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10757 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10758 // FIXME: We should support more exceptions. | 10758 // FIXME: We should support more exceptions. |
10759 RELEASE_ASSERT_NOT_REACHED(); | 10759 RELEASE_ASSERT_NOT_REACHED(); |
10760 } | 10760 } |
10761 block.ReThrow(); | 10761 block.ReThrow(); |
10762 return false; | 10762 return false; |
10763 } | 10763 } |
10764 return true; | 10764 return true; |
10765 } | 10765 } |
10766 | 10766 |
10767 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) | 10767 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) |
(...skipping 10 matching lines...) Expand all Loading... |
10778 return false; | 10778 return false; |
10779 | 10779 |
10780 ScriptState::Scope scope(scriptState); | 10780 ScriptState::Scope scope(scriptState); |
10781 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10781 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10782 | 10782 |
10783 v8::Handle<v8::Value> *argv = 0; | 10783 v8::Handle<v8::Value> *argv = 0; |
10784 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); | 10784 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); |
10785 v8::TryCatch block; | 10785 v8::TryCatch block; |
10786 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); | 10786 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); |
10787 if (block.HasCaught()) { | 10787 if (block.HasCaught()) { |
10788 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10788 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10789 // FIXME: We should support more exceptions. | 10789 // FIXME: We should support more exceptions. |
10790 RELEASE_ASSERT_NOT_REACHED(); | 10790 RELEASE_ASSERT_NOT_REACHED(); |
10791 } | 10791 } |
10792 block.ReThrow(); | 10792 block.ReThrow(); |
10793 return false; | 10793 return false; |
10794 } | 10794 } |
10795 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10795 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10796 RELEASE_ASSERT(!exceptionState.hadException()); | 10796 RELEASE_ASSERT(!exceptionState.hadException()); |
10797 *result = cppValue; | 10797 *result = cppValue; |
10798 return true; | 10798 return true; |
(...skipping 14 matching lines...) Expand all Loading... |
10813 | 10813 |
10814 ScriptState::Scope scope(scriptState); | 10814 ScriptState::Scope scope(scriptState); |
10815 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10815 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10816 | 10816 |
10817 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 10817 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
10818 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10818 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); | 10819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); |
10820 v8::TryCatch block; | 10820 v8::TryCatch block; |
10821 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde
r, 1, argv); | 10821 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde
r, 1, argv); |
10822 if (block.HasCaught()) { | 10822 if (block.HasCaught()) { |
10823 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10823 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10824 // FIXME: We should support more exceptions. | 10824 // FIXME: We should support more exceptions. |
10825 RELEASE_ASSERT_NOT_REACHED(); | 10825 RELEASE_ASSERT_NOT_REACHED(); |
10826 } | 10826 } |
10827 block.ReThrow(); | 10827 block.ReThrow(); |
10828 return false; | 10828 return false; |
10829 } | 10829 } |
10830 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10830 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10831 RELEASE_ASSERT(!exceptionState.hadException()); | 10831 RELEASE_ASSERT(!exceptionState.hadException()); |
10832 *result = cppValue; | 10832 *result = cppValue; |
10833 return true; | 10833 return true; |
(...skipping 14 matching lines...) Expand all Loading... |
10848 | 10848 |
10849 ScriptState::Scope scope(scriptState); | 10849 ScriptState::Scope scope(scriptState); |
10850 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10850 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10851 | 10851 |
10852 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); | 10852 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); |
10853 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10853 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | 10854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); |
10855 v8::TryCatch block; | 10855 v8::TryCatch block; |
10856 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol
der, 1, argv); | 10856 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol
der, 1, argv); |
10857 if (block.HasCaught()) { | 10857 if (block.HasCaught()) { |
10858 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10858 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10859 // FIXME: We should support more exceptions. | 10859 // FIXME: We should support more exceptions. |
10860 RELEASE_ASSERT_NOT_REACHED(); | 10860 RELEASE_ASSERT_NOT_REACHED(); |
10861 } | 10861 } |
10862 block.ReThrow(); | 10862 block.ReThrow(); |
10863 return false; | 10863 return false; |
10864 } | 10864 } |
10865 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 10865 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
10866 RELEASE_ASSERT(!exceptionState.hadException()); | 10866 RELEASE_ASSERT(!exceptionState.hadException()); |
10867 *result = cppValue; | 10867 *result = cppValue; |
10868 return true; | 10868 return true; |
(...skipping 14 matching lines...) Expand all Loading... |
10883 | 10883 |
10884 ScriptState::Scope scope(scriptState); | 10884 ScriptState::Scope scope(scriptState); |
10885 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10885 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10886 | 10886 |
10887 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); | 10887 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); |
10888 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10888 v8::Handle<v8::Value> argv[] = { valueHandle }; |
10889 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); | 10889 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); |
10890 v8::TryCatch block; | 10890 v8::TryCatch block; |
10891 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); | 10891 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); |
10892 if (block.HasCaught()) { | 10892 if (block.HasCaught()) { |
10893 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10893 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10894 // FIXME: We should support more exceptions. | 10894 // FIXME: We should support more exceptions. |
10895 RELEASE_ASSERT_NOT_REACHED(); | 10895 RELEASE_ASSERT_NOT_REACHED(); |
10896 } | 10896 } |
10897 block.ReThrow(); | 10897 block.ReThrow(); |
10898 return false; | 10898 return false; |
10899 } | 10899 } |
10900 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10900 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
10901 RELEASE_ASSERT(!exceptionState.hadException()); | 10901 RELEASE_ASSERT(!exceptionState.hadException()); |
10902 *result = cppValue; | 10902 *result = cppValue; |
10903 return true; | 10903 return true; |
(...skipping 18 matching lines...) Expand all Loading... |
10922 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context()
->Global(), scriptState->isolate()); | 10922 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context()
->Global(), scriptState->isolate()); |
10923 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global
(), scriptState->isolate()); | 10923 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global
(), scriptState->isolate()); |
10924 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | 10924 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); |
10925 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(),
value2); | 10925 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(),
value2); |
10926 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); | 10926 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); |
10927 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; | 10927 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; |
10928 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | 10928 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); |
10929 v8::TryCatch block; | 10929 v8::TryCatch block; |
10930 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); | 10930 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); |
10931 if (block.HasCaught()) { | 10931 if (block.HasCaught()) { |
10932 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10932 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10933 // FIXME: We should support more exceptions. | 10933 // FIXME: We should support more exceptions. |
10934 RELEASE_ASSERT_NOT_REACHED(); | 10934 RELEASE_ASSERT_NOT_REACHED(); |
10935 } | 10935 } |
10936 block.ReThrow(); | 10936 block.ReThrow(); |
10937 return false; | 10937 return false; |
10938 } | 10938 } |
10939 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10939 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
10940 RELEASE_ASSERT(!exceptionState.hadException()); | 10940 RELEASE_ASSERT(!exceptionState.hadException()); |
10941 *result = cppValue; | 10941 *result = cppValue; |
10942 return true; | 10942 return true; |
(...skipping 15 matching lines...) Expand all Loading... |
10958 ScriptState::Scope scope(scriptState); | 10958 ScriptState::Scope scope(scriptState); |
10959 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10959 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10960 | 10960 |
10961 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | 10961 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); |
10962 v8::Handle<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate()
, value2); | 10962 v8::Handle<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate()
, value2); |
10963 v8::Handle<v8::Value> argv[] = { value1Handle, value2Handle }; | 10963 v8::Handle<v8::Value> argv[] = { value1Handle, value2Handle }; |
10964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 10964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
10965 v8::TryCatch block; | 10965 v8::TryCatch block; |
10966 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); | 10966 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); |
10967 if (block.HasCaught()) { | 10967 if (block.HasCaught()) { |
10968 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10968 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
10969 // FIXME: We should support more exceptions. | 10969 // FIXME: We should support more exceptions. |
10970 RELEASE_ASSERT_NOT_REACHED(); | 10970 RELEASE_ASSERT_NOT_REACHED(); |
10971 } | 10971 } |
10972 block.ReThrow(); | 10972 block.ReThrow(); |
10973 return false; | 10973 return false; |
10974 } | 10974 } |
10975 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10975 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10976 RELEASE_ASSERT(!exceptionState.hadException()); | 10976 RELEASE_ASSERT(!exceptionState.hadException()); |
10977 *result = cppValue; | 10977 *result = cppValue; |
10978 return true; | 10978 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
10991 if (!scriptState->executionContext()) | 10991 if (!scriptState->executionContext()) |
10992 return false; | 10992 return false; |
10993 | 10993 |
10994 ScriptState::Scope scope(scriptState); | 10994 ScriptState::Scope scope(scriptState); |
10995 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10995 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10996 | 10996 |
10997 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); | 10997 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); |
10998 v8::TryCatch block; | 10998 v8::TryCatch block; |
10999 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "readonlyShortAttribute", holder); | 10999 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "readonlyShortAttribute", holder); |
11000 if (block.HasCaught()) { | 11000 if (block.HasCaught()) { |
11001 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11001 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11002 // FIXME: We should support more exceptions. | 11002 // FIXME: We should support more exceptions. |
11003 RELEASE_ASSERT_NOT_REACHED(); | 11003 RELEASE_ASSERT_NOT_REACHED(); |
11004 } | 11004 } |
11005 block.ReThrow(); | 11005 block.ReThrow(); |
11006 return false; | 11006 return false; |
11007 } | 11007 } |
11008 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 11008 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
11009 RELEASE_ASSERT(!exceptionState.hadException()); | 11009 RELEASE_ASSERT(!exceptionState.hadException()); |
11010 *result = cppValue; | 11010 *result = cppValue; |
11011 return true; | 11011 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
11024 if (!scriptState->executionContext()) | 11024 if (!scriptState->executionContext()) |
11025 return false; | 11025 return false; |
11026 | 11026 |
11027 ScriptState::Scope scope(scriptState); | 11027 ScriptState::Scope scope(scriptState); |
11028 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11028 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11029 | 11029 |
11030 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11030 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11031 v8::TryCatch block; | 11031 v8::TryCatch block; |
11032 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "shortAttribute", holder); | 11032 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "shortAttribute", holder); |
11033 if (block.HasCaught()) { | 11033 if (block.HasCaught()) { |
11034 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11034 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11035 // FIXME: We should support more exceptions. | 11035 // FIXME: We should support more exceptions. |
11036 RELEASE_ASSERT_NOT_REACHED(); | 11036 RELEASE_ASSERT_NOT_REACHED(); |
11037 } | 11037 } |
11038 block.ReThrow(); | 11038 block.ReThrow(); |
11039 return false; | 11039 return false; |
11040 } | 11040 } |
11041 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 11041 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
11042 RELEASE_ASSERT(!exceptionState.hadException()); | 11042 RELEASE_ASSERT(!exceptionState.hadException()); |
11043 *result = cppValue; | 11043 *result = cppValue; |
11044 return true; | 11044 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
11057 if (!scriptState->executionContext()) | 11057 if (!scriptState->executionContext()) |
11058 return false; | 11058 return false; |
11059 | 11059 |
11060 ScriptState::Scope scope(scriptState); | 11060 ScriptState::Scope scope(scriptState); |
11061 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11061 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11062 | 11062 |
11063 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11063 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11064 v8::TryCatch block; | 11064 v8::TryCatch block; |
11065 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); | 11065 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); |
11066 if (block.HasCaught()) { | 11066 if (block.HasCaught()) { |
11067 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11067 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11068 // FIXME: We should support more exceptions. | 11068 // FIXME: We should support more exceptions. |
11069 RELEASE_ASSERT_NOT_REACHED(); | 11069 RELEASE_ASSERT_NOT_REACHED(); |
11070 } | 11070 } |
11071 block.ReThrow(); | 11071 block.ReThrow(); |
11072 return false; | 11072 return false; |
11073 } | 11073 } |
11074 return true; | 11074 return true; |
11075 } | 11075 } |
11076 | 11076 |
11077 bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result) | 11077 bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result) |
11078 { | 11078 { |
11079 if (!frame) | 11079 if (!frame) |
11080 return false; | 11080 return false; |
11081 v8::HandleScope handleScope(toIsolate(frame)); | 11081 v8::HandleScope handleScope(toIsolate(frame)); |
11082 ScriptForbiddenScope::AllowUserAgentScript script; | 11082 ScriptForbiddenScope::AllowUserAgentScript script; |
11083 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11083 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11084 if (context.IsEmpty()) | 11084 if (context.IsEmpty()) |
11085 return false; | 11085 return false; |
11086 ScriptState* scriptState = ScriptState::from(context); | 11086 ScriptState* scriptState = ScriptState::from(context); |
11087 if (!scriptState->executionContext()) | 11087 if (!scriptState->executionContext()) |
11088 return false; | 11088 return false; |
11089 | 11089 |
11090 ScriptState::Scope scope(scriptState); | 11090 ScriptState::Scope scope(scriptState); |
11091 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11091 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11092 | 11092 |
11093 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11093 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11094 v8::TryCatch block; | 11094 v8::TryCatch block; |
11095 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "stringAttribute", holder); | 11095 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "stringAttribute", holder); |
11096 if (block.HasCaught()) { | 11096 if (block.HasCaught()) { |
11097 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11097 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11098 // FIXME: We should support more exceptions. | 11098 // FIXME: We should support more exceptions. |
11099 RELEASE_ASSERT_NOT_REACHED(); | 11099 RELEASE_ASSERT_NOT_REACHED(); |
11100 } | 11100 } |
11101 block.ReThrow(); | 11101 block.ReThrow(); |
11102 return false; | 11102 return false; |
11103 } | 11103 } |
11104 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11104 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
11105 RELEASE_ASSERT(!exceptionState.hadException()); | 11105 RELEASE_ASSERT(!exceptionState.hadException()); |
11106 *result = cppValue; | 11106 *result = cppValue; |
11107 return true; | 11107 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
11120 if (!scriptState->executionContext()) | 11120 if (!scriptState->executionContext()) |
11121 return false; | 11121 return false; |
11122 | 11122 |
11123 ScriptState::Scope scope(scriptState); | 11123 ScriptState::Scope scope(scriptState); |
11124 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11124 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11125 | 11125 |
11126 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11126 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11127 v8::TryCatch block; | 11127 v8::TryCatch block; |
11128 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); | 11128 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); |
11129 if (block.HasCaught()) { | 11129 if (block.HasCaught()) { |
11130 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11130 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11131 // FIXME: We should support more exceptions. | 11131 // FIXME: We should support more exceptions. |
11132 RELEASE_ASSERT_NOT_REACHED(); | 11132 RELEASE_ASSERT_NOT_REACHED(); |
11133 } | 11133 } |
11134 block.ReThrow(); | 11134 block.ReThrow(); |
11135 return false; | 11135 return false; |
11136 } | 11136 } |
11137 return true; | 11137 return true; |
11138 } | 11138 } |
11139 | 11139 |
11140 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) | 11140 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) |
11141 { | 11141 { |
11142 if (!frame) | 11142 if (!frame) |
11143 return false; | 11143 return false; |
11144 v8::HandleScope handleScope(toIsolate(frame)); | 11144 v8::HandleScope handleScope(toIsolate(frame)); |
11145 ScriptForbiddenScope::AllowUserAgentScript script; | 11145 ScriptForbiddenScope::AllowUserAgentScript script; |
11146 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11146 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11147 if (context.IsEmpty()) | 11147 if (context.IsEmpty()) |
11148 return false; | 11148 return false; |
11149 ScriptState* scriptState = ScriptState::from(context); | 11149 ScriptState* scriptState = ScriptState::from(context); |
11150 if (!scriptState->executionContext()) | 11150 if (!scriptState->executionContext()) |
11151 return false; | 11151 return false; |
11152 | 11152 |
11153 ScriptState::Scope scope(scriptState); | 11153 ScriptState::Scope scope(scriptState); |
11154 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11154 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11155 | 11155 |
11156 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11156 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11157 v8::TryCatch block; | 11157 v8::TryCatch block; |
11158 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); | 11158 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); |
11159 if (block.HasCaught()) { | 11159 if (block.HasCaught()) { |
11160 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11160 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11161 // FIXME: We should support more exceptions. | 11161 // FIXME: We should support more exceptions. |
11162 RELEASE_ASSERT_NOT_REACHED(); | 11162 RELEASE_ASSERT_NOT_REACHED(); |
11163 } | 11163 } |
11164 block.ReThrow(); | 11164 block.ReThrow(); |
11165 return false; | 11165 return false; |
11166 } | 11166 } |
11167 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11167 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
11168 RELEASE_ASSERT(!exceptionState.hadException()); | 11168 RELEASE_ASSERT(!exceptionState.hadException()); |
11169 *result = cppValue; | 11169 *result = cppValue; |
11170 return true; | 11170 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
11183 if (!scriptState->executionContext()) | 11183 if (!scriptState->executionContext()) |
11184 return false; | 11184 return false; |
11185 | 11185 |
11186 ScriptState::Scope scope(scriptState); | 11186 ScriptState::Scope scope(scriptState); |
11187 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11187 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11188 | 11188 |
11189 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11189 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11190 v8::TryCatch block; | 11190 v8::TryCatch block; |
11191 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); | 11191 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); |
11192 if (block.HasCaught()) { | 11192 if (block.HasCaught()) { |
11193 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11193 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11194 // FIXME: We should support more exceptions. | 11194 // FIXME: We should support more exceptions. |
11195 RELEASE_ASSERT_NOT_REACHED(); | 11195 RELEASE_ASSERT_NOT_REACHED(); |
11196 } | 11196 } |
11197 block.ReThrow(); | 11197 block.ReThrow(); |
11198 return false; | 11198 return false; |
11199 } | 11199 } |
11200 return true; | 11200 return true; |
11201 } | 11201 } |
11202 | 11202 |
11203 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(L
ocalFrame* frame, TestObject* holderImpl, String* result) | 11203 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(L
ocalFrame* frame, TestObject* holderImpl, String* result) |
11204 { | 11204 { |
11205 if (!frame) | 11205 if (!frame) |
11206 return false; | 11206 return false; |
11207 v8::HandleScope handleScope(toIsolate(frame)); | 11207 v8::HandleScope handleScope(toIsolate(frame)); |
11208 ScriptForbiddenScope::AllowUserAgentScript script; | 11208 ScriptForbiddenScope::AllowUserAgentScript script; |
11209 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11209 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11210 if (context.IsEmpty()) | 11210 if (context.IsEmpty()) |
11211 return false; | 11211 return false; |
11212 ScriptState* scriptState = ScriptState::from(context); | 11212 ScriptState* scriptState = ScriptState::from(context); |
11213 if (!scriptState->executionContext()) | 11213 if (!scriptState->executionContext()) |
11214 return false; | 11214 return false; |
11215 | 11215 |
11216 ScriptState::Scope scope(scriptState); | 11216 ScriptState::Scope scope(scriptState); |
11217 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11217 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11218 | 11218 |
11219 ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 11219 ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
11220 v8::TryCatch block; | 11220 v8::TryCatch block; |
11221 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "attributeForPrivateScriptOnly", holder); | 11221 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "attributeForPrivateScriptOnly", holder); |
11222 if (block.HasCaught()) { | 11222 if (block.HasCaught()) { |
11223 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11223 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11224 // FIXME: We should support more exceptions. | 11224 // FIXME: We should support more exceptions. |
11225 RELEASE_ASSERT_NOT_REACHED(); | 11225 RELEASE_ASSERT_NOT_REACHED(); |
11226 } | 11226 } |
11227 block.ReThrow(); | 11227 block.ReThrow(); |
11228 return false; | 11228 return false; |
11229 } | 11229 } |
11230 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11230 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
11231 RELEASE_ASSERT(!exceptionState.hadException()); | 11231 RELEASE_ASSERT(!exceptionState.hadException()); |
11232 *result = cppValue; | 11232 *result = cppValue; |
11233 return true; | 11233 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
11246 if (!scriptState->executionContext()) | 11246 if (!scriptState->executionContext()) |
11247 return false; | 11247 return false; |
11248 | 11248 |
11249 ScriptState::Scope scope(scriptState); | 11249 ScriptState::Scope scope(scriptState); |
11250 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11250 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11251 | 11251 |
11252 ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 11252 ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
11253 v8::TryCatch block; | 11253 v8::TryCatch block; |
11254 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "attri
buteForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); | 11254 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "attri
buteForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); |
11255 if (block.HasCaught()) { | 11255 if (block.HasCaught()) { |
11256 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11256 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
11257 // FIXME: We should support more exceptions. | 11257 // FIXME: We should support more exceptions. |
11258 RELEASE_ASSERT_NOT_REACHED(); | 11258 RELEASE_ASSERT_NOT_REACHED(); |
11259 } | 11259 } |
11260 block.ReThrow(); | 11260 block.ReThrow(); |
11261 return false; | 11261 return false; |
11262 } | 11262 } |
11263 return true; | 11263 return true; |
11264 } | 11264 } |
11265 | 11265 |
11266 } // namespace blink | 11266 } // namespace blink |
OLD | NEW |