Chromium Code Reviews| Index: Source/modules/push_messaging/PushManager.cpp |
| diff --git a/Source/modules/push_messaging/PushManager.cpp b/Source/modules/push_messaging/PushManager.cpp |
| index 90a7f642a0609fd76d63b1742bcce2aaf7792703..9d7810367dd2b220453c45762996cfa207868453 100644 |
| --- a/Source/modules/push_messaging/PushManager.cpp |
| +++ b/Source/modules/push_messaging/PushManager.cpp |
| @@ -93,6 +93,10 @@ ScriptPromise PushManager::permissionState(ScriptState* scriptState, const PushS |
| if (!document->domWindow() || !document->frame()) |
| return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "Document is detached from window.")); |
| } |
| + if (!options.userVisibleOnly()) { |
| + return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError, |
|
johnme
2015/05/08 15:48:22
To change the subject (since I think Peter and Mic
johnme
2015/05/08 15:57:07
Oh, it's rejecting the promise with an exception,
Miguel Garcia
2015/05/08 21:00:32
Yes, it feels more accurate than just denying. Tha
|
| + "Chrome does not support push subscriptions that do not enable the userVisibleOnly option.")); |
| + } |
| RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
| ScriptPromise promise = resolver->promise(); |