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

Unified Diff: third_party/WebKit/Source/core/events/ErrorEvent.h

Issue 2804533002: Update Error Event inside a worker to provide the exact exception value (Closed)
Patch Set: nits Created 3 years, 8 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: third_party/WebKit/Source/core/events/ErrorEvent.h
diff --git a/third_party/WebKit/Source/core/events/ErrorEvent.h b/third_party/WebKit/Source/core/events/ErrorEvent.h
index 01d0ffe7cc967ee237c16f6f498d3ae990e36cb2..eb9e6b326e79edccdd4bf56d2fbb4a6e68e116e9 100644
--- a/third_party/WebKit/Source/core/events/ErrorEvent.h
+++ b/third_party/WebKit/Source/core/events/ErrorEvent.h
@@ -49,8 +49,16 @@ class ErrorEvent final : public Event {
static ErrorEvent* create(const String& message,
std::unique_ptr<SourceLocation> location,
DOMWrapperWorld* world) {
- return new ErrorEvent(message, std::move(location), world);
+ return new ErrorEvent(message, std::move(location), ScriptValue(), world);
}
+
+ static ErrorEvent* create(const String& message,
+ std::unique_ptr<SourceLocation> location,
+ ScriptValue error,
+ DOMWrapperWorld* world) {
+ return new ErrorEvent(message, std::move(location), error, world);
+ }
+
static ErrorEvent* create(const AtomicString& type,
const ErrorEventInit& initializer) {
return new ErrorEvent(type, initializer);
@@ -58,7 +66,7 @@ class ErrorEvent final : public Event {
static ErrorEvent* createSanitizedError(DOMWrapperWorld* world) {
return new ErrorEvent("Script error.",
SourceLocation::create(String(), 0, 0, nullptr),
- world);
+ ScriptValue(), world);
}
~ErrorEvent() override;
@@ -89,6 +97,7 @@ class ErrorEvent final : public Event {
ErrorEvent();
ErrorEvent(const String& message,
std::unique_ptr<SourceLocation>,
+ ScriptValue error,
DOMWrapperWorld*);
ErrorEvent(const AtomicString&, const ErrorEventInit&);

Powered by Google App Engine
This is Rietveld 408576698