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 10607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10618 template<> | 10618 template<> |
10619 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 10619 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
10620 { | 10620 { |
10621 return toV8(impl, creationContext, isolate); | 10621 return toV8(impl, creationContext, isolate); |
10622 } | 10622 } |
10623 | 10623 |
10624 bool V8TestObject::voidMethodImplementedInPrivateScriptMethodImplementedInPrivat
eScript(LocalFrame* frame, TestObject* holderImpl) | 10624 bool V8TestObject::voidMethodImplementedInPrivateScriptMethodImplementedInPrivat
eScript(LocalFrame* frame, TestObject* holderImpl) |
10625 { | 10625 { |
10626 if (!frame) | 10626 if (!frame) |
10627 return false; | 10627 return false; |
| 10628 v8::HandleScope handleScope(toIsolate(frame)); |
10628 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10629 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10629 if (context.IsEmpty()) | 10630 if (context.IsEmpty()) |
10630 return false; | 10631 return false; |
10631 ScriptState* scriptState = ScriptState::from(context); | 10632 ScriptState* scriptState = ScriptState::from(context); |
10632 if (!scriptState->executionContext()) | 10633 if (!scriptState->executionContext()) |
10633 return false; | 10634 return false; |
10634 | 10635 |
10635 ScriptState::Scope scope(scriptState); | 10636 ScriptState::Scope scope(scriptState); |
10636 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10637 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10637 | 10638 |
10638 v8::Handle<v8::Value> *argv = 0; | 10639 v8::Handle<v8::Value> *argv = 0; |
10639 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); | 10640 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); |
10640 v8::TryCatch block; | 10641 v8::TryCatch block; |
10641 V8RethrowTryCatchScope rethrow(block); | 10642 V8RethrowTryCatchScope rethrow(block); |
10642 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); | 10643 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); |
10643 if (block.HasCaught()) { | 10644 if (block.HasCaught()) { |
10644 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); | 10645 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); |
10645 return false; | 10646 return false; |
10646 } | 10647 } |
10647 return true; | 10648 return true; |
10648 } | 10649 } |
10649 | 10650 |
10650 bool V8TestObject::shortMethodImplementedInPrivateScriptMethodImplementedInPriva
teScript(LocalFrame* frame, TestObject* holderImpl, int* result) | 10651 bool V8TestObject::shortMethodImplementedInPrivateScriptMethodImplementedInPriva
teScript(LocalFrame* frame, TestObject* holderImpl, int* result) |
10651 { | 10652 { |
10652 if (!frame) | 10653 if (!frame) |
10653 return false; | 10654 return false; |
| 10655 v8::HandleScope handleScope(toIsolate(frame)); |
10654 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10656 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10655 if (context.IsEmpty()) | 10657 if (context.IsEmpty()) |
10656 return false; | 10658 return false; |
10657 ScriptState* scriptState = ScriptState::from(context); | 10659 ScriptState* scriptState = ScriptState::from(context); |
10658 if (!scriptState->executionContext()) | 10660 if (!scriptState->executionContext()) |
10659 return false; | 10661 return false; |
10660 | 10662 |
10661 ScriptState::Scope scope(scriptState); | 10663 ScriptState::Scope scope(scriptState); |
10662 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10664 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10663 | 10665 |
(...skipping 12 matching lines...) Expand all Loading... |
10676 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10678 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10677 RELEASE_ASSERT(!exceptionState.hadException()); | 10679 RELEASE_ASSERT(!exceptionState.hadException()); |
10678 *result = cppValue; | 10680 *result = cppValue; |
10679 return true; | 10681 return true; |
10680 } | 10682 } |
10681 | 10683 |
10682 bool V8TestObject::shortMethodWithShortArgumentImplementedInPrivateScriptMethodI
mplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, int value,
int* result) | 10684 bool V8TestObject::shortMethodWithShortArgumentImplementedInPrivateScriptMethodI
mplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, int value,
int* result) |
10683 { | 10685 { |
10684 if (!frame) | 10686 if (!frame) |
10685 return false; | 10687 return false; |
| 10688 v8::HandleScope handleScope(toIsolate(frame)); |
10686 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10689 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10687 if (context.IsEmpty()) | 10690 if (context.IsEmpty()) |
10688 return false; | 10691 return false; |
10689 ScriptState* scriptState = ScriptState::from(context); | 10692 ScriptState* scriptState = ScriptState::from(context); |
10690 if (!scriptState->executionContext()) | 10693 if (!scriptState->executionContext()) |
10691 return false; | 10694 return false; |
10692 | 10695 |
10693 ScriptState::Scope scope(scriptState); | 10696 ScriptState::Scope scope(scriptState); |
10694 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10697 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10695 | 10698 |
(...skipping 13 matching lines...) Expand all Loading... |
10709 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10712 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10710 RELEASE_ASSERT(!exceptionState.hadException()); | 10713 RELEASE_ASSERT(!exceptionState.hadException()); |
10711 *result = cppValue; | 10714 *result = cppValue; |
10712 return true; | 10715 return true; |
10713 } | 10716 } |
10714 | 10717 |
10715 bool V8TestObject::stringMethodWithStringArgumentImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, String va
lue, String* result) | 10718 bool V8TestObject::stringMethodWithStringArgumentImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, String va
lue, String* result) |
10716 { | 10719 { |
10717 if (!frame) | 10720 if (!frame) |
10718 return false; | 10721 return false; |
| 10722 v8::HandleScope handleScope(toIsolate(frame)); |
10719 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10723 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10720 if (context.IsEmpty()) | 10724 if (context.IsEmpty()) |
10721 return false; | 10725 return false; |
10722 ScriptState* scriptState = ScriptState::from(context); | 10726 ScriptState* scriptState = ScriptState::from(context); |
10723 if (!scriptState->executionContext()) | 10727 if (!scriptState->executionContext()) |
10724 return false; | 10728 return false; |
10725 | 10729 |
10726 ScriptState::Scope scope(scriptState); | 10730 ScriptState::Scope scope(scriptState); |
10727 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10731 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10728 | 10732 |
(...skipping 13 matching lines...) Expand all Loading... |
10742 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 10746 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
10743 RELEASE_ASSERT(!exceptionState.hadException()); | 10747 RELEASE_ASSERT(!exceptionState.hadException()); |
10744 *result = cppValue; | 10748 *result = cppValue; |
10745 return true; | 10749 return true; |
10746 } | 10750 } |
10747 | 10751 |
10748 bool V8TestObject::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodImp
lementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWil
lBeRawPtr<Node> value, RefPtrWillBeRawPtr<Node>* result) | 10752 bool V8TestObject::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodImp
lementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWil
lBeRawPtr<Node> value, RefPtrWillBeRawPtr<Node>* result) |
10749 { | 10753 { |
10750 if (!frame) | 10754 if (!frame) |
10751 return false; | 10755 return false; |
| 10756 v8::HandleScope handleScope(toIsolate(frame)); |
10752 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10757 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10753 if (context.IsEmpty()) | 10758 if (context.IsEmpty()) |
10754 return false; | 10759 return false; |
10755 ScriptState* scriptState = ScriptState::from(context); | 10760 ScriptState* scriptState = ScriptState::from(context); |
10756 if (!scriptState->executionContext()) | 10761 if (!scriptState->executionContext()) |
10757 return false; | 10762 return false; |
10758 | 10763 |
10759 ScriptState::Scope scope(scriptState); | 10764 ScriptState::Scope scope(scriptState); |
10760 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10765 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10761 | 10766 |
(...skipping 13 matching lines...) Expand all Loading... |
10775 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10780 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
10776 RELEASE_ASSERT(!exceptionState.hadException()); | 10781 RELEASE_ASSERT(!exceptionState.hadException()); |
10777 *result = cppValue; | 10782 *result = cppValue; |
10778 return true; | 10783 return true; |
10779 } | 10784 } |
10780 | 10785 |
10781 bool V8TestObject::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPt
rWillBeRawPtr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1,
double value2, String string, RefPtrWillBeRawPtr<Node>* result) | 10786 bool V8TestObject::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPt
rWillBeRawPtr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1,
double value2, String string, RefPtrWillBeRawPtr<Node>* result) |
10782 { | 10787 { |
10783 if (!frame) | 10788 if (!frame) |
10784 return false; | 10789 return false; |
| 10790 v8::HandleScope handleScope(toIsolate(frame)); |
10785 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10791 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10786 if (context.IsEmpty()) | 10792 if (context.IsEmpty()) |
10787 return false; | 10793 return false; |
10788 ScriptState* scriptState = ScriptState::from(context); | 10794 ScriptState* scriptState = ScriptState::from(context); |
10789 if (!scriptState->executionContext()) | 10795 if (!scriptState->executionContext()) |
10790 return false; | 10796 return false; |
10791 | 10797 |
10792 ScriptState::Scope scope(scriptState); | 10798 ScriptState::Scope scope(scriptState); |
10793 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10799 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10794 | 10800 |
(...skipping 17 matching lines...) Expand all Loading... |
10812 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10818 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
10813 RELEASE_ASSERT(!exceptionState.hadException()); | 10819 RELEASE_ASSERT(!exceptionState.hadException()); |
10814 *result = cppValue; | 10820 *result = cppValue; |
10815 return true; | 10821 return true; |
10816 } | 10822 } |
10817 | 10823 |
10818 bool V8TestObject::addIntegerForPrivateScriptOnlyMethodImplementedInPrivateScrip
t(LocalFrame* frame, TestObject* holderImpl, int value1, int value2, int* result
) | 10824 bool V8TestObject::addIntegerForPrivateScriptOnlyMethodImplementedInPrivateScrip
t(LocalFrame* frame, TestObject* holderImpl, int value1, int value2, int* result
) |
10819 { | 10825 { |
10820 if (!frame) | 10826 if (!frame) |
10821 return false; | 10827 return false; |
| 10828 v8::HandleScope handleScope(toIsolate(frame)); |
10822 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10829 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10823 if (context.IsEmpty()) | 10830 if (context.IsEmpty()) |
10824 return false; | 10831 return false; |
10825 ScriptState* scriptState = ScriptState::from(context); | 10832 ScriptState* scriptState = ScriptState::from(context); |
10826 if (!scriptState->executionContext()) | 10833 if (!scriptState->executionContext()) |
10827 return false; | 10834 return false; |
10828 | 10835 |
10829 ScriptState::Scope scope(scriptState); | 10836 ScriptState::Scope scope(scriptState); |
10830 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10837 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10831 | 10838 |
(...skipping 14 matching lines...) Expand all Loading... |
10846 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10853 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10847 RELEASE_ASSERT(!exceptionState.hadException()); | 10854 RELEASE_ASSERT(!exceptionState.hadException()); |
10848 *result = cppValue; | 10855 *result = cppValue; |
10849 return true; | 10856 return true; |
10850 } | 10857 } |
10851 | 10858 |
10852 bool V8TestObject::readonlyShortAttributeAttributeGetterImplementedInPrivateScri
pt(LocalFrame* frame, TestObject* holderImpl, int* result) | 10859 bool V8TestObject::readonlyShortAttributeAttributeGetterImplementedInPrivateScri
pt(LocalFrame* frame, TestObject* holderImpl, int* result) |
10853 { | 10860 { |
10854 if (!frame) | 10861 if (!frame) |
10855 return false; | 10862 return false; |
| 10863 v8::HandleScope handleScope(toIsolate(frame)); |
10856 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10864 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10857 if (context.IsEmpty()) | 10865 if (context.IsEmpty()) |
10858 return false; | 10866 return false; |
10859 ScriptState* scriptState = ScriptState::from(context); | 10867 ScriptState* scriptState = ScriptState::from(context); |
10860 if (!scriptState->executionContext()) | 10868 if (!scriptState->executionContext()) |
10861 return false; | 10869 return false; |
10862 | 10870 |
10863 ScriptState::Scope scope(scriptState); | 10871 ScriptState::Scope scope(scriptState); |
10864 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10872 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10865 | 10873 |
(...skipping 11 matching lines...) Expand all Loading... |
10877 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10885 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10878 RELEASE_ASSERT(!exceptionState.hadException()); | 10886 RELEASE_ASSERT(!exceptionState.hadException()); |
10879 *result = cppValue; | 10887 *result = cppValue; |
10880 return true; | 10888 return true; |
10881 } | 10889 } |
10882 | 10890 |
10883 bool V8TestObject::shortAttributeAttributeGetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int* result) | 10891 bool V8TestObject::shortAttributeAttributeGetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int* result) |
10884 { | 10892 { |
10885 if (!frame) | 10893 if (!frame) |
10886 return false; | 10894 return false; |
| 10895 v8::HandleScope handleScope(toIsolate(frame)); |
10887 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10896 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10888 if (context.IsEmpty()) | 10897 if (context.IsEmpty()) |
10889 return false; | 10898 return false; |
10890 ScriptState* scriptState = ScriptState::from(context); | 10899 ScriptState* scriptState = ScriptState::from(context); |
10891 if (!scriptState->executionContext()) | 10900 if (!scriptState->executionContext()) |
10892 return false; | 10901 return false; |
10893 | 10902 |
10894 ScriptState::Scope scope(scriptState); | 10903 ScriptState::Scope scope(scriptState); |
10895 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10904 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10896 | 10905 |
(...skipping 11 matching lines...) Expand all Loading... |
10908 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10917 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
10909 RELEASE_ASSERT(!exceptionState.hadException()); | 10918 RELEASE_ASSERT(!exceptionState.hadException()); |
10910 *result = cppValue; | 10919 *result = cppValue; |
10911 return true; | 10920 return true; |
10912 } | 10921 } |
10913 | 10922 |
10914 bool V8TestObject::shortAttributeAttributeSetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int cppValue) | 10923 bool V8TestObject::shortAttributeAttributeSetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int cppValue) |
10915 { | 10924 { |
10916 if (!frame) | 10925 if (!frame) |
10917 return false; | 10926 return false; |
| 10927 v8::HandleScope handleScope(toIsolate(frame)); |
10918 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10928 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10919 if (context.IsEmpty()) | 10929 if (context.IsEmpty()) |
10920 return false; | 10930 return false; |
10921 ScriptState* scriptState = ScriptState::from(context); | 10931 ScriptState* scriptState = ScriptState::from(context); |
10922 if (!scriptState->executionContext()) | 10932 if (!scriptState->executionContext()) |
10923 return false; | 10933 return false; |
10924 | 10934 |
10925 ScriptState::Scope scope(scriptState); | 10935 ScriptState::Scope scope(scriptState); |
10926 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10936 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10927 | 10937 |
10928 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 10938 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
10929 v8::TryCatch block; | 10939 v8::TryCatch block; |
10930 V8RethrowTryCatchScope rethrow(block); | 10940 V8RethrowTryCatchScope rethrow(block); |
10931 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); | 10941 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); |
10932 if (block.HasCaught()) { | 10942 if (block.HasCaught()) { |
10933 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 10943 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10934 // FIXME: We should support exceptions other than DOM exceptions. | 10944 // FIXME: We should support exceptions other than DOM exceptions. |
10935 RELEASE_ASSERT_NOT_REACHED(); | 10945 RELEASE_ASSERT_NOT_REACHED(); |
10936 } | 10946 } |
10937 return false; | 10947 return false; |
10938 } | 10948 } |
10939 return true; | 10949 return true; |
10940 } | 10950 } |
10941 | 10951 |
10942 bool V8TestObject::stringAttributeAttributeGetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String* result) | 10952 bool V8TestObject::stringAttributeAttributeGetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String* result) |
10943 { | 10953 { |
10944 if (!frame) | 10954 if (!frame) |
10945 return false; | 10955 return false; |
| 10956 v8::HandleScope handleScope(toIsolate(frame)); |
10946 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10957 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10947 if (context.IsEmpty()) | 10958 if (context.IsEmpty()) |
10948 return false; | 10959 return false; |
10949 ScriptState* scriptState = ScriptState::from(context); | 10960 ScriptState* scriptState = ScriptState::from(context); |
10950 if (!scriptState->executionContext()) | 10961 if (!scriptState->executionContext()) |
10951 return false; | 10962 return false; |
10952 | 10963 |
10953 ScriptState::Scope scope(scriptState); | 10964 ScriptState::Scope scope(scriptState); |
10954 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10965 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10955 | 10966 |
(...skipping 11 matching lines...) Expand all Loading... |
10967 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 10978 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
10968 RELEASE_ASSERT(!exceptionState.hadException()); | 10979 RELEASE_ASSERT(!exceptionState.hadException()); |
10969 *result = cppValue; | 10980 *result = cppValue; |
10970 return true; | 10981 return true; |
10971 } | 10982 } |
10972 | 10983 |
10973 bool V8TestObject::stringAttributeAttributeSetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String cppValue) | 10984 bool V8TestObject::stringAttributeAttributeSetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String cppValue) |
10974 { | 10985 { |
10975 if (!frame) | 10986 if (!frame) |
10976 return false; | 10987 return false; |
| 10988 v8::HandleScope handleScope(toIsolate(frame)); |
10977 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10989 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
10978 if (context.IsEmpty()) | 10990 if (context.IsEmpty()) |
10979 return false; | 10991 return false; |
10980 ScriptState* scriptState = ScriptState::from(context); | 10992 ScriptState* scriptState = ScriptState::from(context); |
10981 if (!scriptState->executionContext()) | 10993 if (!scriptState->executionContext()) |
10982 return false; | 10994 return false; |
10983 | 10995 |
10984 ScriptState::Scope scope(scriptState); | 10996 ScriptState::Scope scope(scriptState); |
10985 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10997 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
10986 | 10998 |
10987 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 10999 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
10988 v8::TryCatch block; | 11000 v8::TryCatch block; |
10989 V8RethrowTryCatchScope rethrow(block); | 11001 V8RethrowTryCatchScope rethrow(block); |
10990 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); | 11002 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); |
10991 if (block.HasCaught()) { | 11003 if (block.HasCaught()) { |
10992 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11004 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
10993 // FIXME: We should support exceptions other than DOM exceptions. | 11005 // FIXME: We should support exceptions other than DOM exceptions. |
10994 RELEASE_ASSERT_NOT_REACHED(); | 11006 RELEASE_ASSERT_NOT_REACHED(); |
10995 } | 11007 } |
10996 return false; | 11008 return false; |
10997 } | 11009 } |
10998 return true; | 11010 return true; |
10999 } | 11011 } |
11000 | 11012 |
11001 bool V8TestObject::nodeAttributeAttributeGetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) | 11013 bool V8TestObject::nodeAttributeAttributeGetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) |
11002 { | 11014 { |
11003 if (!frame) | 11015 if (!frame) |
11004 return false; | 11016 return false; |
| 11017 v8::HandleScope handleScope(toIsolate(frame)); |
11005 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11018 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11006 if (context.IsEmpty()) | 11019 if (context.IsEmpty()) |
11007 return false; | 11020 return false; |
11008 ScriptState* scriptState = ScriptState::from(context); | 11021 ScriptState* scriptState = ScriptState::from(context); |
11009 if (!scriptState->executionContext()) | 11022 if (!scriptState->executionContext()) |
11010 return false; | 11023 return false; |
11011 | 11024 |
11012 ScriptState::Scope scope(scriptState); | 11025 ScriptState::Scope scope(scriptState); |
11013 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11026 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11014 | 11027 |
(...skipping 11 matching lines...) Expand all Loading... |
11026 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11039 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
11027 RELEASE_ASSERT(!exceptionState.hadException()); | 11040 RELEASE_ASSERT(!exceptionState.hadException()); |
11028 *result = cppValue; | 11041 *result = cppValue; |
11029 return true; | 11042 return true; |
11030 } | 11043 } |
11031 | 11044 |
11032 bool V8TestObject::nodeAttributeAttributeSetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) | 11045 bool V8TestObject::nodeAttributeAttributeSetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) |
11033 { | 11046 { |
11034 if (!frame) | 11047 if (!frame) |
11035 return false; | 11048 return false; |
| 11049 v8::HandleScope handleScope(toIsolate(frame)); |
11036 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11050 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11037 if (context.IsEmpty()) | 11051 if (context.IsEmpty()) |
11038 return false; | 11052 return false; |
11039 ScriptState* scriptState = ScriptState::from(context); | 11053 ScriptState* scriptState = ScriptState::from(context); |
11040 if (!scriptState->executionContext()) | 11054 if (!scriptState->executionContext()) |
11041 return false; | 11055 return false; |
11042 | 11056 |
11043 ScriptState::Scope scope(scriptState); | 11057 ScriptState::Scope scope(scriptState); |
11044 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11058 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11045 | 11059 |
11046 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11060 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
11047 v8::TryCatch block; | 11061 v8::TryCatch block; |
11048 V8RethrowTryCatchScope rethrow(block); | 11062 V8RethrowTryCatchScope rethrow(block); |
11049 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); | 11063 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); |
11050 if (block.HasCaught()) { | 11064 if (block.HasCaught()) { |
11051 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11065 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11052 // FIXME: We should support exceptions other than DOM exceptions. | 11066 // FIXME: We should support exceptions other than DOM exceptions. |
11053 RELEASE_ASSERT_NOT_REACHED(); | 11067 RELEASE_ASSERT_NOT_REACHED(); |
11054 } | 11068 } |
11055 return false; | 11069 return false; |
11056 } | 11070 } |
11057 return true; | 11071 return true; |
11058 } | 11072 } |
11059 | 11073 |
11060 bool V8TestObject::stringAttributeForPrivateScriptOnlyAttributeGetterImplemented
InPrivateScript(LocalFrame* frame, TestObject* holderImpl, String* result) | 11074 bool V8TestObject::stringAttributeForPrivateScriptOnlyAttributeGetterImplemented
InPrivateScript(LocalFrame* frame, TestObject* holderImpl, String* result) |
11061 { | 11075 { |
11062 if (!frame) | 11076 if (!frame) |
11063 return false; | 11077 return false; |
| 11078 v8::HandleScope handleScope(toIsolate(frame)); |
11064 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11079 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11065 if (context.IsEmpty()) | 11080 if (context.IsEmpty()) |
11066 return false; | 11081 return false; |
11067 ScriptState* scriptState = ScriptState::from(context); | 11082 ScriptState* scriptState = ScriptState::from(context); |
11068 if (!scriptState->executionContext()) | 11083 if (!scriptState->executionContext()) |
11069 return false; | 11084 return false; |
11070 | 11085 |
11071 ScriptState::Scope scope(scriptState); | 11086 ScriptState::Scope scope(scriptState); |
11072 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11087 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11073 | 11088 |
(...skipping 11 matching lines...) Expand all Loading... |
11085 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11100 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
11086 RELEASE_ASSERT(!exceptionState.hadException()); | 11101 RELEASE_ASSERT(!exceptionState.hadException()); |
11087 *result = cppValue; | 11102 *result = cppValue; |
11088 return true; | 11103 return true; |
11089 } | 11104 } |
11090 | 11105 |
11091 bool V8TestObject::stringAttributeForPrivateScriptOnlyAttributeSetterImplemented
InPrivateScript(LocalFrame* frame, TestObject* holderImpl, String cppValue) | 11106 bool V8TestObject::stringAttributeForPrivateScriptOnlyAttributeSetterImplemented
InPrivateScript(LocalFrame* frame, TestObject* holderImpl, String cppValue) |
11092 { | 11107 { |
11093 if (!frame) | 11108 if (!frame) |
11094 return false; | 11109 return false; |
| 11110 v8::HandleScope handleScope(toIsolate(frame)); |
11095 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11111 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
11096 if (context.IsEmpty()) | 11112 if (context.IsEmpty()) |
11097 return false; | 11113 return false; |
11098 ScriptState* scriptState = ScriptState::from(context); | 11114 ScriptState* scriptState = ScriptState::from(context); |
11099 if (!scriptState->executionContext()) | 11115 if (!scriptState->executionContext()) |
11100 return false; | 11116 return false; |
11101 | 11117 |
11102 ScriptState::Scope scope(scriptState); | 11118 ScriptState::Scope scope(scriptState); |
11103 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11119 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11104 | 11120 |
11105 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
eForPrivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptSt
ate->isolate()); | 11121 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
eForPrivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptSt
ate->isolate()); |
11106 v8::TryCatch block; | 11122 v8::TryCatch block; |
11107 V8RethrowTryCatchScope rethrow(block); | 11123 V8RethrowTryCatchScope rethrow(block); |
11108 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttributeForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppVal
ue)); | 11124 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttributeForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppVal
ue)); |
11109 if (block.HasCaught()) { | 11125 if (block.HasCaught()) { |
11110 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11126 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
11111 // FIXME: We should support exceptions other than DOM exceptions. | 11127 // FIXME: We should support exceptions other than DOM exceptions. |
11112 RELEASE_ASSERT_NOT_REACHED(); | 11128 RELEASE_ASSERT_NOT_REACHED(); |
11113 } | 11129 } |
11114 return false; | 11130 return false; |
11115 } | 11131 } |
11116 return true; | 11132 return true; |
11117 } | 11133 } |
11118 | 11134 |
11119 } // namespace blink | 11135 } // namespace blink |
OLD | NEW |