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

Unified Diff: Source/core/dom/ErrorEvent.cpp

Issue 22985006: Throw an exception when denying access to 'Frame's 'location' setter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/core/dom/ErrorEvent.h ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ErrorEvent.cpp
diff --git a/Source/core/dom/ErrorEvent.cpp b/Source/core/dom/ErrorEvent.cpp
index 7c4b3c169307e2370ce394ee6c8ee9fcda681355..ecb3d4b842da6957d0d6b775c7eb058957df44ab 100644
--- a/Source/core/dom/ErrorEvent.cpp
+++ b/Source/core/dom/ErrorEvent.cpp
@@ -50,7 +50,7 @@ ErrorEvent::ErrorEvent()
ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializer)
: Event(type, initializer)
- , m_message(initializer.message)
+ , m_sanitizedMessage(initializer.message)
, m_fileName(initializer.filename)
, m_lineNumber(initializer.lineno)
, m_columnNumber(initializer.colno)
@@ -60,7 +60,7 @@ ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber)
: Event(eventNames().errorEvent, false, true)
- , m_message(message)
+ , m_sanitizedMessage(message)
, m_fileName(fileName)
, m_lineNumber(lineNumber)
, m_columnNumber(columnNumber)
@@ -68,6 +68,12 @@ ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l
ScriptWrappable::init(this);
}
+void ErrorEvent::setUnsanitizedMessage(const String& message)
+{
+ ASSERT(m_unsanitizedMessage.isEmpty());
+ m_unsanitizedMessage = message;
+}
+
ErrorEvent::~ErrorEvent()
{
}
« no previous file with comments | « Source/core/dom/ErrorEvent.h ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698