Description was changed from ========== Worker: Move close() from WorkerGlobalScope to the derived interfaces BUG= ...
4 years, 7 months ago
(2016-05-13 08:20:03 UTC)
#1
Description was changed from
==========
Worker: Move close() from WorkerGlobalScope to the derived interfaces
BUG=
==========
to
==========
Worker: Move close() from WorkerGlobalScope to the 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.
BUG=611640
==========
nhiroki
Patchset #1 (id:1) has been deleted
4 years, 7 months ago
(2016-05-13 08:22:50 UTC)
#2
Patchset #1 (id:1) has been deleted
nhiroki
Description was changed from ========== Worker: Move close() from WorkerGlobalScope to the derived interfaces close() ...
4 years, 7 months ago
(2016-05-13 08:25:44 UTC)
#3
Description was changed from
==========
Worker: Move close() from WorkerGlobalScope to the 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.
BUG=611640
==========
to
==========
Worker: Move close() from WorkerGlobalScope to the 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...
SharedWorkerGlobalScope:
https://html.spec.whatwg.org/multipage/workers.html#shared-workers-and-the-sh...
ServiceWorkerGlobalScope:
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#se...
BUG=611640
==========
4 years, 7 months ago
(2016-05-15 14:09:38 UTC)
#7
https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right):
https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:127: virtual bool
isClosing() const { return false; }
It might be easier to follow the code to just keep close() and m_closing on this
class but disable in the subclasses that don't implement close, otherwise I
think we should have explicit comments here, e.g. "Should return true when the
WorkerGlobalScope is closing (e.g. via close() method). If this returns true
the worker is going to be shutdown after the current task execution. Workers
that don't support close operation should always return false"
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
Thank you for reviewing. Updated. PTAL.
https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/workers/WorkerGlobalScope.h (right):
https://codereview.chromium.org/1970003004/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/workers/WorkerGlobalScope.h:127: virtual bool
isClosing() const { return false; }
On 2016/05/15 14:09:37, kinuko wrote:
> It might be easier to follow the code to just keep close() and m_closing on
this
> class but disable in the subclasses that don't implement close, otherwise I
> think we should have explicit comments here, e.g. "Should return true when the
> WorkerGlobalScope is closing (e.g. via close() method). If this returns true
> the worker is going to be shutdown after the current task execution. Workers
> that don't support close operation should always return false"
SGTM. The latest patchset keeps close() and m_closing on this class, and adds a
header comment on close().
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
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
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 4