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

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

Issue 311733003: Fix ExceptionState with empty context. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/V8Initializer.cpp » ('j') | 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 1d95598c623298e3a1156d06502bf2ba0e973d37..d51325cc41d93c62dd52267f61879a44b7235e9f 100644
--- a/Source/bindings/v8/ExceptionState.cpp
+++ b/Source/bindings/v8/ExceptionState.cpp
@@ -47,6 +47,7 @@ void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& me
{
ASSERT(ec);
ASSERT(m_isolate);
+ ASSERT(!m_creationContext.IsEmpty());
// SecurityError is thrown via ::throwSecurityError, and _careful_ consideration must be given to the data exposed to JavaScript via the 'sanitizedMessage'.
ASSERT(ec != SecurityError);
@@ -60,6 +61,7 @@ void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& me
void ExceptionState::throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage)
{
ASSERT(m_isolate);
+ ASSERT(!m_creationContext.IsEmpty());
m_code = SecurityError;
String finalSanitized = addExceptionContext(sanitizedMessage);
m_message = finalSanitized;
« no previous file with comments | « no previous file | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698