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

Issue 1670813004: Avoid data race on CrossThreadPersistents during thread detachment. (Closed)

Created:
4 years, 10 months ago by sof
Modified:
4 years, 10 months ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), blink-reviews, kinuko+watch, kouhei+heap_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid data race on CrossThreadPersistents during thread detachment. As part of detaching a thread from Oilpan and emptying its heap, the CrossThreadPersistent<>s pointing into that heap are cleared. Doing so entails traversing the collection of such persistents and checking their heap membership -- that traversal might race with other threads who are not at any safepoint. To avoid the race, insist that updates to CrossThreadPersistent<>s are atomic along with the corresponding read when doing the above traversal. R=haraken BUG=584250 Committed: https://crrev.com/09e769ad8f46553a3833223269c8b5d43db60199 Cr-Commit-Position: refs/heads/master@{#373814}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M third_party/WebKit/Source/platform/heap/Handle.h View 3 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/PersistentNode.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (5 generated)
sof
please take a look. This touches on crbug.com/515432 , and a shorter-term fix until per-thread ...
4 years, 10 months ago (2016-02-05 10:50:24 UTC) #2
haraken
LGTM
4 years, 10 months ago (2016-02-05 11:02:21 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1670813004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1670813004/1
4 years, 10 months ago (2016-02-05 15:24:28 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-05 15:29:30 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 15:30:06 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/09e769ad8f46553a3833223269c8b5d43db60199
Cr-Commit-Position: refs/heads/master@{#373814}

Powered by Google App Engine
This is Rietveld 408576698