Chromium Code Reviews| Index: third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp |
| diff --git a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp |
| index 1d78fb2383aaa40a9aa9c30acaecacf0d0cdabed..405e3ef3cf1f563f5f95eb15ccde5e65370d984e 100644 |
| --- a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp |
| +++ b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp |
| @@ -34,7 +34,7 @@ BeforeInstallPromptEvent::BeforeInstallPromptEvent( |
| BeforeInstallPromptEvent::BeforeInstallPromptEvent( |
| const AtomicString& name, |
| const BeforeInstallPromptEventInit& init) |
| - : Event(name, false, true), m_binding(this), m_promptCalled(false) { |
| + : Event(name, init), m_binding(this), m_promptCalled(false) { |
| if (init.hasPlatforms()) |
| m_platforms = init.platforms(); |
| } |
| @@ -59,7 +59,7 @@ ScriptPromise BeforeInstallPromptEvent::userChoice(ScriptState* scriptState) { |
| return m_userChoice->promise(scriptState->world()); |
| return ScriptPromise::rejectWithDOMException( |
| scriptState, |
| - DOMException::create(InvalidStateError, |
| + DOMException::create(NotAllowedError, |
|
Matt Giuca
2017/04/26 05:28:50
This is technically a breaking change (though NOBO
Matt Giuca
2017/05/11 01:42:05
Per https://crbug.com/658639, this bug was a mista
dominickn
2017/05/11 01:51:57
Done.
|
| "userChoice cannot be accessed on this event.")); |
| } |
| @@ -69,7 +69,7 @@ ScriptPromise BeforeInstallPromptEvent::prompt(ScriptState* scriptState) { |
| if (!defaultPrevented() || m_promptCalled || !m_bannerService.is_bound()) { |
| return ScriptPromise::rejectWithDOMException( |
| scriptState, |
| - DOMException::create(InvalidStateError, |
| + DOMException::create(NotAllowedError, |
| "The prompt() method may only be called once, " |
| "following preventDefault().")); |
| } |