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

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

Created:
4 years, 6 months ago by sof
Modified:
4 years, 6 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
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 Review-Url: https://codereview.chromium.org/2013173002 Cr-Commit-Position: refs/heads/master@{#396540} (cherry picked from commit 174054b089b91ea41c4baa09bcc7b6762fe42005) Conflicts: third_party/WebKit/Source/platform/heap/Heap.cpp third_party/WebKit/Source/platform/heap/PersistentNode.h Committed: https://chromium.googlesource.com/chromium/src/+/354e3aca5dfd0a3158935b9b4b551a561f5ffaac

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 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 chunk +30 lines, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
sof
4 years, 6 months ago (2016-06-15 05:52:59 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
354e3aca5dfd0a3158935b9b4b551a561f5ffaac.

Powered by Google App Engine
This is Rietveld 408576698