Chromium Code Reviews| 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) |