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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
index 191f03d3b479194f68f80f5fbf6397e7c662c34c..280506e7e71555f306e3f8b9813c1a5e025929dc 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
@@ -37,6 +37,12 @@
namespace blink {
+ExceptionState::~ExceptionState()
+{
+ if (!m_exception.isEmpty())
+ throwException();
+}
+
void ExceptionState::clearException()
{
m_code = 0;
@@ -98,6 +104,7 @@ void ExceptionState::throwException()
{
ASSERT(!m_exception.isEmpty());
V8ThrowException::throwException(m_exception.newLocal(m_isolate), m_isolate);
+ clearException();
Yuki 2016/06/15 07:23:25 Why do you need this line? throwException() is a
}
void ExceptionState::throwTypeError(const String& message)

Powered by Google App Engine
This is Rietveld 408576698