Chromium Code Reviews| 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); |