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

Issue 1744973002: Make AbstractWorker a ContextLifecycleObserver rather than an ActiveDOMObject (Closed)

Created:
4 years, 9 months ago by haraken
Modified:
4 years, 9 months ago
Reviewers:
kinuko, sof
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+worker_chromium.org, 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

Make AbstractWorker a ContextLifecycleObserver rather than an ActiveDOMObject Per the plan described in https://groups.google.com/a/chromium.org/d/topic/blink-dev/UwRGJgLBElo/discussion, this CL reduces ActiveDOMObjects in the code base. - This CL replaces ServiceWorker::m_wasStopped with ContextLifecycleObserver::executionContext(). - This CL removes an 'if(AbstractWorker::hasPendingActivity)' check because it always returns true. BUG=589507 Committed: https://crrev.com/21ab87586c14afb2a22c91b05d932563cba9569d Cr-Commit-Position: refs/heads/master@{#378332}

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -28 lines) Patch
M third_party/WebKit/Source/core/workers/AbstractWorker.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/AbstractWorker.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerBase.h View 1 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp View 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/SharedWorker.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h View 1 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp View 2 chunks +2 lines, -12 lines 2 comments Download

Messages

Total messages: 22 (6 generated)
haraken
PTAL
4 years, 9 months ago (2016-02-29 08:33:57 UTC) #2
kinuko
https://codereview.chromium.org/1744973002/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp (left): https://codereview.chromium.org/1744973002/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp#oldcode47 third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp:47: suspendIfNeeded(); We no longer need this? https://codereview.chromium.org/1744973002/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h File third_party/WebKit/Source/core/workers/InProcessWorkerBase.h ...
4 years, 9 months ago (2016-02-29 09:33:52 UTC) #3
haraken
https://codereview.chromium.org/1744973002/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp (left): https://codereview.chromium.org/1744973002/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp#oldcode47 third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp:47: suspendIfNeeded(); On 2016/02/29 09:33:51, kinuko wrote: > We no ...
4 years, 9 months ago (2016-02-29 10:52:47 UTC) #4
haraken
(cc Sigbjorn for sanity checking)
4 years, 9 months ago (2016-02-29 11:20:21 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1744973002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1744973002/40001
4 years, 9 months ago (2016-02-29 11:20:53 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-02-29 12:28:32 UTC) #10
sof
looks fine. Kicked off a mac_blink_oilpan_rel trybot run; i _believe_ that is now building with ...
4 years, 9 months ago (2016-02-29 13:34:32 UTC) #11
kinuko
lgtm, thanks.
4 years, 9 months ago (2016-02-29 13:53:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1744973002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1744973002/40001
4 years, 9 months ago (2016-02-29 23:37:41 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-01 00:06:45 UTC) #15
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/21ab87586c14afb2a22c91b05d932563cba9569d Cr-Commit-Position: refs/heads/master@{#378332}
4 years, 9 months ago (2016-03-01 00:08:00 UTC) #17
sof
https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp File third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp (right): https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp#newcode114 third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp:114: if (!executionContext()) Using !executionContext() here rather than an explicit ...
4 years, 9 months ago (2016-03-02 19:59:57 UTC) #18
haraken
https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp File third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp (right): https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp#newcode114 third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp:114: if (!executionContext()) On 2016/03/02 19:59:57, sof wrote: > Using ...
4 years, 9 months ago (2016-03-03 02:39:38 UTC) #19
sof
On 2016/03/03 02:39:38, haraken wrote: > https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp > File third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp (right): > > https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp#newcode114 > ...
4 years, 9 months ago (2016-03-03 10:03:14 UTC) #20
haraken
On 2016/03/03 10:03:14, sof wrote: > On 2016/03/03 02:39:38, haraken wrote: > > > https://codereview.chromium.org/1744973002/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp ...
4 years, 9 months ago (2016-03-03 10:05:23 UTC) #21
haraken
4 years, 9 months ago (2016-03-03 10:05:47 UTC) #22
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1765493002/ by haraken@chromium.org.

The reason for reverting is: I noticed that we're not ready to remove the
m_stopped variable (because
LifecycleObserver does not yet have an ability to clear
LifecycleObserver::m_context when the context is destroyed). We need to fix the
LifecycleObserver before landing this fix..

Powered by Google App Engine
This is Rietveld 408576698