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

Issue 2849583004: Worker: Stop disposing of the global scope scheduler in WorkerThread::WillProcessTask() (Closed)

Created:
3 years, 7 months ago by nhiroki
Modified:
3 years, 7 months ago
Reviewers:
tzik
CC:
chromium-reviews, shimazu+worker_chromium.org, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Worker: Stop disposing of the global scope scheduler in WorkerThread::WillProcessTask() When forcible termination is requested, WorkerThread::WillProcessTask() calls PrepareForShutdownOnWorkerThread() that disposes of the global scope scheduler, which in turn disposes of the task to be run. This results in crashes. This CL moves PrepareForShutdownOnWorkerThread() call from WillProcessTask() to DidProcessTask() to fix the crashes. This could still cause a crash if the termination request is issued between DidProcessTask() and WillProcessTask() because in the case a task runs and may access an empty handle returned by V8 API. However, such a case would be rare because generally forcible termination is scheduled as a delayed task(*) and DidProcessTask() can have a chance to check IsForciblyTerminated() before it's fired. (*) Forcible termination could synchronously be called in some path, but it'll be removed (see issue 641846). BUG=713914 Review-Url: https://codereview.chromium.org/2849583004 Cr-Commit-Position: refs/heads/master@{#468001} Committed: https://chromium.googlesource.com/chromium/src/+/611639da9364de0f00eb0136523482a9b7b394b7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -6 lines) Patch
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 2 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 19 (15 generated)
nhiroki
PTAL, thanks!
3 years, 7 months ago (2017-04-28 11:01:41 UTC) #9
tzik
lgtm
3 years, 7 months ago (2017-04-28 11:50:13 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2849583004/20001
3 years, 7 months ago (2017-04-28 15:15:24 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 15:20:19 UTC) #19
Message was sent while issue was closed.
Committed patchset #1 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/611639da9364de0f00eb01365234...

Powered by Google App Engine
This is Rietveld 408576698