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

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

Issue 20351002: Add 'error' parameter to 'window.onerror' handlers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ErrorEvent.h
diff --git a/Source/core/dom/ErrorEvent.h b/Source/core/dom/ErrorEvent.h
index 1e57e25c112a6c213e1811a677d8b9d6250aefd2..5a674a45c3d85fc6fa931671b791052cdbb4da80 100644
--- a/Source/core/dom/ErrorEvent.h
+++ b/Source/core/dom/ErrorEvent.h
@@ -31,8 +31,11 @@
#ifndef ErrorEvent_h
#define ErrorEvent_h
+#include "bindings/v8/ScriptValue.h"
+#include "bindings/v8/SerializedScriptValue.h"
#include "core/dom/Event.h"
#include "wtf/text/WTFString.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -43,6 +46,7 @@ struct ErrorEventInit : public EventInit {
String filename;
unsigned lineno;
unsigned column;
+ ScriptValue error;
};
class ErrorEvent : public Event {
@@ -51,9 +55,9 @@ public:
{
return adoptRef(new ErrorEvent);
}
- static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber)
+ static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, const ScriptValue& error)
{
- return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumber));
+ return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumber, error));
}
static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEventInit& initializer)
{
@@ -65,18 +69,23 @@ public:
const String& filename() const { return m_fileName; }
unsigned lineno() const { return m_lineNumber; }
unsigned column() const { return m_columnNumber; }
+ const ScriptValue& error() const { return m_error; }
abarth-chromium 2013/07/25 18:24:08 Doesn't this create a leak between isolated worlds
+ void setSerializedError(PassRefPtr<SerializedScriptValue> error) { m_serializedError = error; }
virtual const AtomicString& interfaceName() const;
private:
ErrorEvent();
- ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber);
+ ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, const ScriptValue& error);
ErrorEvent(const AtomicString&, const ErrorEventInit&);
String m_message;
String m_fileName;
unsigned m_lineNumber;
unsigned m_columnNumber;
+ ScriptValue m_error;
+
+ RefPtr<SerializedScriptValue> m_serializedError;
};
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698