Index: Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp |
index 7c6fa9c75a7859e150d481f982d4b4957a4c9ef1..ef68824cde4d0336ef13de2b4283b7add179863d 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp |
@@ -76,11 +76,11 @@ ScriptPromise ServiceWorkerWindowClient::focus(ScriptState* scriptState) |
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
ScriptPromise promise = resolver->promise(); |
- if (!scriptState->executionContext()->isWindowInteractionAllowed()) { |
+ if (!scriptState->executionContext()->isWindowFocusAllowed()) { |
resolver->reject(DOMException::create(InvalidAccessError, "Not allowed to focus a window.")); |
return promise; |
} |
- scriptState->executionContext()->consumeWindowInteraction(); |
+ scriptState->executionContext()->consumeWindowFocus(); |
ServiceWorkerGlobalScopeClient::from(scriptState->executionContext())->focus(id(), new CallbackPromiseAdapter<ServiceWorkerWindowClient, ServiceWorkerError>(resolver)); |
return promise; |