Chromium Code Reviews| Index: Source/bindings/v8/ExceptionState.cpp |
| diff --git a/Source/bindings/v8/ExceptionState.cpp b/Source/bindings/v8/ExceptionState.cpp |
| index 8061edc47843b79bffbca05f9728c8f0258d6925..005668015f43232abd39c8f1dc9972b8b063994e 100644 |
| --- a/Source/bindings/v8/ExceptionState.cpp |
| +++ b/Source/bindings/v8/ExceptionState.cpp |
| @@ -79,6 +79,15 @@ void ExceptionState::setException(v8::Handle<v8::Value> exception) |
| m_exception.set(m_isolate, exception); |
| } |
| +void ExceptionState::throwException() |
| +{ |
| + ASSERT(!m_exception.isEmpty() || m_code); |
|
haraken
2014/03/31 12:49:16
Can this simply be ASSERT(!m_exception.isEmpty())
fs
2014/03/31 12:57:00
AFAIU that would then miss the "m_exception.isEmpt
haraken
2014/03/31 13:00:05
I'd just add ASSERT(!m_exception.isEmpty()) and re
|
| + if (m_exception.isEmpty()) |
| + throwDOMException(m_code, String()); // FIXME: Do we ever hit this? If so, where and why? |
| + ASSERT(!m_exception.isEmpty()); |
|
haraken
2014/03/31 12:49:16
Then you can remove this.
|
| + V8ThrowException::throwError(m_exception.newLocal(m_isolate), m_isolate); |
| +} |
| + |
| void ExceptionState::throwTypeError(const String& message) |
| { |
| ASSERT(m_isolate); |