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

Unified Diff: Source/bindings/v8/ExceptionState.cpp

Issue 219263002: Improve chances for inlining of ExceptionState::throwIfNeeded() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop LIKELY. Created 6 years, 9 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
« no previous file with comments | « Source/bindings/v8/ExceptionState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ if (m_exception.isEmpty())
+ throwDOMException(m_code, String()); // FIXME: Do we ever hit this? If so, where and why?
+ ASSERT(!m_exception.isEmpty());
+ V8ThrowException::throwError(m_exception.newLocal(m_isolate), m_isolate);
+}
+
void ExceptionState::throwTypeError(const String& message)
{
ASSERT(m_isolate);
« no previous file with comments | « Source/bindings/v8/ExceptionState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698