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

Issue 1970003004: Worker: Move close() from WorkerGlobalScope to derived interfaces (Closed)

Created:
4 years, 7 months ago by nhiroki
Modified:
4 years, 7 months ago
Reviewers:
kinuko, tkent
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+worker_chromium.org, haraken, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Worker: Move close() from WorkerGlobalScope to derived interfaces close() was originally defined in WorkerGlobalScope, but it was moved to derived interfaces by the recent spec change (https://github.com/whatwg/html/pull/1119). This CL moves close() from WorkerGlobalScope to the derived interfaces, namely, DedicatedWorkerGlobalScope and SharedWorkerGlobalScope, and also removes close() from ServiceWorkerGlobalScope. These changes should not break applications in the wild. For DedicatedWorker and SharedWorker, close() is still valid after this change. For ServiceWorker, close() is not accessible after this change, but it raised an exception and was not usable in the first place. Specs: WorkerGlobalScope: https://html.spec.whatwg.org/multipage/workers.html#workerglobalscope DedicatedWorkerGlobalScope: https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-dedicatedworkerglobalscope-interface SharedWorkerGlobalScope: https://html.spec.whatwg.org/multipage/workers.html#shared-workers-and-the-sharedworkerglobalscope-interface ServiceWorkerGlobalScope: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-global-scope BUG=611640 Committed: https://crrev.com/cd0f180962882117b13fd369372bdb92f4b5ecc7 Cr-Commit-Position: refs/heads/master@{#394077}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : address review comment #

Patch Set 3 : add header comment #

Total comments: 2

Patch Set 4 : add const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -42 lines) Patch
D third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/close.html View 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/close-worker.js View 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
nhiroki
PTAL, thanks!
4 years, 7 months ago (2016-05-13 08:26:37 UTC) #5
kinuko
https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h#newcode127 third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:127: virtual bool isClosing() const { return false; } It ...
4 years, 7 months ago (2016-05-15 14:09:38 UTC) #7
nhiroki
Thank you for reviewing. Updated. PTAL. https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h#newcode127 third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:127: virtual bool isClosing() ...
4 years, 7 months ago (2016-05-16 09:12:13 UTC) #8
kinuko
lgtm https://codereview.chromium.org/1970003004/diff/60001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/1970003004/diff/60001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h#newcode132 third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:132: bool isClosing() { return m_closing; } nit: could ...
4 years, 7 months ago (2016-05-16 09:40:49 UTC) #9
nhiroki
Thank you! https://codereview.chromium.org/1970003004/diff/60001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/1970003004/diff/60001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h#newcode132 third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:132: bool isClosing() { return m_closing; } On ...
4 years, 7 months ago (2016-05-17 01:19:16 UTC) #11
nhiroki
+tkent@, can you review Source/web/ServiceWorkerGlobalScopeProxy.cpp ? Thanks!
4 years, 7 months ago (2016-05-17 01:19:58 UTC) #13
tkent
lgtm. This CL has a web-exposed API change, but it has no compatibility risk as ...
4 years, 7 months ago (2016-05-17 01:54:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970003004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970003004/80001
4 years, 7 months ago (2016-05-17 02:04:38 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 7 months ago (2016-05-17 07:30:38 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-05-17 07:32:49 UTC) #21
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/cd0f180962882117b13fd369372bdb92f4b5ecc7
Cr-Commit-Position: refs/heads/master@{#394077}

Powered by Google App Engine
This is Rietveld 408576698