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

Issue 1831743002: Worker: Move an assertion to a correct place (Closed)

Created:
4 years, 9 months ago by nhiroki
Modified:
4 years, 9 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews, blink-reviews, kinuko+worker_chromium.org, falken, blink-worker-reviews_chromium.org, horo+watch_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 an assertion to a correct place This CL fixes an assertion failure happening only on non-oilpan builds. WorkerThread::performShutdownTask() assumes that the count of references to WorkerGlobalScope is only one. However, WorkerThreadableLoader that has a reference to the context is still alive at the point and the assertion fails. This CL moves the assertion to after the line to dispose the loader. <More details> The timing to release a reference to the context owned by the loader was changed by this patch: https://codereview.chromium.org/1749633002 Before the patch, GlobalFetchImpl::StopDetector was an ActiveDOMObject and was supposed to release the reference before performShutdownTask() as follows: WorkerThread::shutdown() WorkerGlobalScope::dispose() stopActiveDOMObjects(); StopDetector::stop() FetchManager::stop() FetchManager::Loader::dispose() // Release WorkerThreadableLoader. WorkerThread::performShutdownTask() // The assertion can pass. The patch removed StopDetector and instead made FetchManager::Loader to observe lifecycle of the context to release the reference. The context destruction is notified after the assertion as follows: WorkerThread::shutdown() WorkerThread::performShutdownTask() // The assertion cannot pass. WorkerGlobalScope::notifyContextDestroyed() LifecycleNotifier::notifyContextDestroyed() FetchManager::contextDestroyed() FetchManager::Loader::dispose() // Release WorkerThreadableLoader. BUG=594230 Committed: https://crrev.com/0fdc4685d3b7e5134109b814eb08d8c265cdb84c Cr-Commit-Position: refs/heads/master@{#383048}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -5 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (7 generated)
nhiroki
Hi, can you review this? Thanks.
4 years, 9 months ago (2016-03-24 08:23:04 UTC) #5
yhirano
lgtm
4 years, 9 months ago (2016-03-24 08:30:44 UTC) #6
haraken
LGTM
4 years, 9 months ago (2016-03-24 08:32:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831743002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831743002/1
4 years, 9 months ago (2016-03-24 08:47:55 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-24 10:23:49 UTC) #11
commit-bot: I haz the power
4 years, 9 months ago (2016-03-24 10:25:06 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0fdc4685d3b7e5134109b814eb08d8c265cdb84c
Cr-Commit-Position: refs/heads/master@{#383048}

Powered by Google App Engine
This is Rietveld 408576698