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

Issue 2119383002: [compositorworker] Avoid deadlock issue caused by importScript (Closed)

Created:
4 years, 5 months ago by majidvp
Modified:
4 years, 5 months ago
Reviewers:
Ian Vollick
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[compositorworker] Avoid deadlock issue caused by importScript importScripts is a sync API that runs on main thread. Using it on CW will block the compositor thread on main which can lead to deallock in the current Blink compositing architecture. So we should avoid it for now. TODO: - Find a way to throw if importScripts is used in CW. Current failure is subtle - Provide and alternative to synchronous importScripts. Note that async resource loading in already possible in workers thanks to fetch so we may be a able to leverage that. BUG=624651 TEST=virtual/threaded/fast/compositorworker Committed: https://crrev.com/ba9a8fbcce17e50e5006a008041301b934cde6f0 Cr-Commit-Position: refs/heads/master@{#403819}

Patch Set 1 #

Total comments: 2

Messages

Total messages: 11 (3 generated)
majidvp
4 years, 5 months ago (2016-07-05 18:15:31 UTC) #2
Ian Vollick
On 2016/07/05 18:15:31, majidvp wrote: Sad, but lgtm.
4 years, 5 months ago (2016-07-05 18:31:30 UTC) #3
majidvp
On 2016/07/05 18:31:30, vollick wrote: > On 2016/07/05 18:15:31, majidvp wrote: > > Sad, but ...
4 years, 5 months ago (2016-07-05 18:36:25 UTC) #4
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/2119383002/1
4 years, 5 months ago (2016-07-05 18:38:16 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-05 19:54:44 UTC) #7
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/ba9a8fbcce17e50e5006a008041301b934cde6f0 Cr-Commit-Position: refs/heads/master@{#403819}
4 years, 5 months ago (2016-07-05 19:56:09 UTC) #9
jbroman
https://codereview.chromium.org/2119383002/diff/1/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js File third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js (right): https://codereview.chromium.org/2119383002/diff/1/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js#newcode21 third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js:21: requestAnimationFrame(check); ex-post-facto question: This looks like it will continue ...
4 years, 5 months ago (2016-07-06 15:14:00 UTC) #10
majidvp
4 years, 5 months ago (2016-07-06 17:45:38 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/2119383002/diff/1/third_party/WebKit/LayoutTe...
File
third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
(right):

https://codereview.chromium.org/2119383002/diff/1/third_party/WebKit/LayoutTe...
third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js:21:
requestAnimationFrame(check);
On 2016/07/06 15:14:00, jbroman wrote:
> ex-post-facto question: This looks like it will continue to
> requestAnimationFrame even after it has resolved the promise (and try to
resolve
> it over and over again). Should this line be in an "else" clause?

It definitely should!

Powered by Google App Engine
This is Rietveld 408576698