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

Issue 1286883004: Keep lock during all of ScriptStreamer::fetchDataFromResourceBuffer. (Closed)

Created:
5 years, 4 months ago by vogelheim
Modified:
5 years, 4 months ago
Reviewers:
Mike West
CC:
blink-reviews, vivekg, blink-reviews-bindings_chromium.org, vivekg_samsung
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Keep lock during all of ScriptStreamer::fetchDataFromResourceBuffer. This fixes a race condition where both the main thread and the V8 background parsing thread call fetchDataFromResourceBuffer. The current lock makes sure only one thread will fetch data from teh resourceBuffer at a time, and the queue they put it in is natively thread safe, but - if threads race in just the right way - the order might be reversed. Example: - thread 1 acquires lock, fetches data from resource buffer. - thread 1 gets interruped; new data arrives in the resource buffer. - thread 2 acquires lock, fetches data from resource buffer - thread 2 adds its chunks to the data queue - thread 1 adds its chunks to the data queue -> the chunks are now queued in the wrong order. BUG=510825 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200990

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -12 lines) Patch
M Source/bindings/core/v8/ScriptStreamer.cpp View 2 chunks +10 lines, -12 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
vogelheim
Hi Mike, please review whenever it's convenient. The "usual suspects" are OoO for ~2 weeks. ...
5 years, 4 months ago (2015-08-20 13:31:52 UTC) #2
Mike West
On 2015/08/20 at 13:31:52, vogelheim wrote: > Hi Mike, please review whenever it's convenient. The ...
5 years, 4 months ago (2015-08-20 17:02:38 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286883004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286883004/1
5 years, 4 months ago (2015-08-21 08:26:26 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/58887)
5 years, 4 months ago (2015-08-21 14:27:24 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286883004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286883004/1
5 years, 4 months ago (2015-08-21 16:42:16 UTC) #9
commit-bot: I haz the power
5 years, 4 months ago (2015-08-21 16:46:51 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200990

Powered by Google App Engine
This is Rietveld 408576698