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

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

Issue 219263002: Improve chances for inlining of ExceptionState::throwIfNeeded() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | Source/bindings/v8/ExceptionState.cpp » ('j') | Source/bindings/v8/ExceptionState.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionState.h
diff --git a/Source/bindings/v8/ExceptionState.h b/Source/bindings/v8/ExceptionState.h
index fbe338f09251e4ff18d7327696a07aea27008daa..a344c3e970db4cb300d1501693616054e8334305 100644
--- a/Source/bindings/v8/ExceptionState.h
+++ b/Source/bindings/v8/ExceptionState.h
@@ -86,13 +86,9 @@ public:
bool throwIfNeeded()
{
- if (m_exception.isEmpty()) {
- if (!m_code)
- return false;
- throwDOMException(m_code, String()); // FIXME: Do we ever hit this? If so, where and why?
- }
-
- V8ThrowException::throwError(m_exception.newLocal(m_isolate), m_isolate);
+ if (LIKELY(!hadException()))
haraken 2014/03/31 12:49:16 Does this LIKELY matter for performance? If you're
fs 2014/03/31 12:57:00 TBH I haven't checked generated code without it -
fs 2014/03/31 13:20:30 Dropped.
+ return false;
+ throwException();
return true;
}
@@ -114,6 +110,7 @@ protected:
private:
void setException(v8::Handle<v8::Value>);
+ void throwException();
String addExceptionContext(const String&) const;
« no previous file with comments | « no previous file | Source/bindings/v8/ExceptionState.cpp » ('j') | Source/bindings/v8/ExceptionState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698