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

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

Issue 20351002: Add 'error' parameter to 'window.onerror' handlers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rework. Created 7 years, 5 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
Index: Source/core/dom/ErrorEvent.cpp
diff --git a/Source/core/dom/ErrorEvent.cpp b/Source/core/dom/ErrorEvent.cpp
index db11e534da322ceb9441137f84bf18ebca988f0f..ae718f21a0566cce1f30cd59c4d6047e5f5ac0f6 100644
--- a/Source/core/dom/ErrorEvent.cpp
+++ b/Source/core/dom/ErrorEvent.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/dom/ErrorEvent.h"
+#include "bindings/v8/ScriptValue.h"
#include "core/dom/EventNames.h"
namespace WebCore {
@@ -53,16 +54,18 @@ ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
, m_fileName(initializer.filename)
, m_lineNumber(initializer.lineno)
, m_columnNumber(initializer.column)
+ , m_error(initializer.error)
{
ScriptWrappable::init(this);
}
-ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber)
+ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, const ScriptValue& error)
: Event(eventNames().errorEvent, false, true)
, m_message(message)
, m_fileName(fileName)
, m_lineNumber(lineNumber)
, m_columnNumber(columnNumber)
+ , m_error(error)
{
ScriptWrappable::init(this);
}
@@ -76,4 +79,10 @@ const AtomicString& ErrorEvent::interfaceName() const
return eventNames().interfaceForErrorEvent;
}
+void ErrorEvent::setSerializedError(PassRefPtr<SerializedScriptValue> error)
+{
+ ASSERT(!m_serializedError);
+ m_serializedError = error;
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698