Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(878)

Side by Side Diff: Source/bindings/tests/results/V8TestInterface.cpp

Issue 462623002: Add a missing check for exceptions thrown in methods implemented in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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)
OLDNEW
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698