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

Issue 2013173002: Lock CrossThreadPersistentRegion until end of weak processing. (Closed)

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

Description

Lock CrossThreadPersistentRegion until end of weak processing. Allocating & releasing a CrossThread(Weak)Persistent is something that all threads are currently allowed, even those not attached to Oilpan and having no heap of their own. It is however not safe for the set of CrossThreadPersistents to be altered while a garbage collection is underway. Not just while the set of registered persistents are being marked and traced, but up until and including the processing of weak (persistent) references that happen after marking. If not, a thread would be able to release a CrossThreadWeakPersistent node which the weak processing separately maintains a pointer to, clearing & freeing its allocation. Which would cause havoc, hence we impose a lock on CrossThreadPersistentRegion while the marking and global weak processing is being performed -- any thread attempting to create or free cross-thread persistents will be locked out for the duration. Following r396432, the use of CrossThreadPersistents from non-attached threads has been reduced greatly and is slight. R= BUG=610477 Committed: https://crrev.com/174054b089b91ea41c4baa09bcc7b6762fe42005 Cr-Commit-Position: refs/heads/master@{#396540}

Patch Set 1 #

Patch Set 2 : compile fix #

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

Messages

Total messages: 12 (6 generated)
sof
please take a look.
4 years, 7 months ago (2016-05-26 21:27:51 UTC) #3
haraken
LGTM, but would you help me understand why we need to grab a lock until ...
4 years, 7 months ago (2016-05-26 21:54:18 UTC) #4
sof
On 2016/05/26 21:54:18, haraken wrote: > LGTM, but would you help me understand why we ...
4 years, 6 months ago (2016-05-27 05:12:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2013173002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2013173002/20001
4 years, 6 months ago (2016-05-27 19:50:11 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-05-27 19:54:32 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-05-27 19:57:44 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/174054b089b91ea41c4baa09bcc7b6762fe42005
Cr-Commit-Position: refs/heads/master@{#396540}

Powered by Google App Engine
This is Rietveld 408576698