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

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: 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..a38c99875a5674ccb9f42e68d80db0b5529d73d8 100644
--- a/third_party/WebKit/Source/core/events/ErrorEvent.h
+++ b/third_party/WebKit/Source/core/events/ErrorEvent.h
@@ -51,6 +51,16 @@ class ErrorEvent final : public Event {
DOMWrapperWorld* world) {
shimazu 2017/04/05 07:23:22 Just confirmation; do we still keep the old factor
yiyix 2017/04/05 09:02:56 I can add a default value to |error|, where error
shimazu 2017/04/05 09:29:40 Yes, as you mentioned default values are not prefe
return new ErrorEvent(message, std::move(location), world);
}
+
+ static ErrorEvent* create(const String& message,
+ std::unique_ptr<SourceLocation> location,
+ DOMWrapperWorld* world,
+ ScriptValue error) {
+ ErrorEvent* event = new ErrorEvent(message, std::move(location), world);
+ event->m_error = error;
+ return event;
+ }
+
static ErrorEvent* create(const AtomicString& type,
const ErrorEventInit& initializer) {
return new ErrorEvent(type, initializer);

Powered by Google App Engine
This is Rietveld 408576698