OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
10 | 10 |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 1663 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
1664 | 1664 |
1665 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 1665 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
1666 v8::Handle<v8::Value> argv[] = { valueHandle }; | 1666 v8::Handle<v8::Value> argv[] = { valueHandle }; |
1667 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr
iptState->context()->Global(), scriptState->isolate()); | 1667 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr
iptState->context()->Global(), scriptState->isolate()); |
1668 v8::TryCatch block; | 1668 v8::TryCatch block; |
1669 V8RethrowTryCatchScope rethrow(block); | 1669 V8RethrowTryCatchScope rethrow(block); |
1670 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPriv
ateScript", holder, 1, argv); | 1670 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPriv
ateScript", holder, 1, argv); |
1671 if (block.HasCaught()) { | 1671 if (block.HasCaught()) { |
1672 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 1672 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
1673 // FIXME: We should support exceptions other than DOM exceptions. | 1673 // FIXME: We should support more exceptions. |
1674 RELEASE_ASSERT_NOT_REACHED(); | 1674 RELEASE_ASSERT_NOT_REACHED(); |
1675 } | 1675 } |
1676 return false; | 1676 return false; |
1677 } | 1677 } |
1678 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 1678 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
1679 RELEASE_ASSERT(!exceptionState.hadException()); | 1679 RELEASE_ASSERT(!exceptionState.hadException()); |
1680 *result = cppValue; | 1680 *result = cppValue; |
1681 return true; | 1681 return true; |
1682 } | 1682 } |
1683 | 1683 |
(...skipping 12 matching lines...) Expand all Loading... |
1696 | 1696 |
1697 ScriptState::Scope scope(scriptState); | 1697 ScriptState::Scope scope(scriptState); |
1698 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 1698 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
1699 | 1699 |
1700 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); | 1700 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); |
1701 v8::TryCatch block; | 1701 v8::TryCatch block; |
1702 V8RethrowTryCatchScope rethrow(block); | 1702 V8RethrowTryCatchScope rethrow(block); |
1703 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestInterfaceImplementation", "stringAttribute", holder); | 1703 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestInterfaceImplementation", "stringAttribute", holder); |
1704 if (block.HasCaught()) { | 1704 if (block.HasCaught()) { |
1705 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 1705 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
1706 // FIXME: We should support exceptions other than DOM exceptions. | 1706 // FIXME: We should support more exceptions. |
1707 RELEASE_ASSERT_NOT_REACHED(); | 1707 RELEASE_ASSERT_NOT_REACHED(); |
1708 } | 1708 } |
1709 return false; | 1709 return false; |
1710 } | 1710 } |
1711 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 1711 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
1712 RELEASE_ASSERT(!exceptionState.hadException()); | 1712 RELEASE_ASSERT(!exceptionState.hadException()); |
1713 *result = cppValue; | 1713 *result = cppValue; |
1714 return true; | 1714 return true; |
1715 } | 1715 } |
1716 | 1716 |
(...skipping 12 matching lines...) Expand all Loading... |
1729 | 1729 |
1730 ScriptState::Scope scope(scriptState); | 1730 ScriptState::Scope scope(scriptState); |
1731 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 1731 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
1732 | 1732 |
1733 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); | 1733 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); |
1734 v8::TryCatch block; | 1734 v8::TryCatch block; |
1735 V8RethrowTryCatchScope rethrow(block); | 1735 V8RethrowTryCatchScope rethrow(block); |
1736 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestInterfaceImplem
entation", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue)
); | 1736 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestInterfaceImplem
entation", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue)
); |
1737 if (block.HasCaught()) { | 1737 if (block.HasCaught()) { |
1738 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 1738 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
1739 // FIXME: We should support exceptions other than DOM exceptions. | 1739 // FIXME: We should support more exceptions. |
1740 RELEASE_ASSERT_NOT_REACHED(); | 1740 RELEASE_ASSERT_NOT_REACHED(); |
1741 } | 1741 } |
1742 return false; | 1742 return false; |
1743 } | 1743 } |
1744 return true; | 1744 return true; |
1745 } | 1745 } |
1746 | 1746 |
1747 } // namespace blink | 1747 } // namespace blink |
1748 #endif // ENABLE(CONDITION) | 1748 #endif // ENABLE(CONDITION) |
OLD | NEW |