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

Issue 2106863003: Handle cross-thread weak persistents during global weak processing. (Closed)

Created:
4 years, 5 months ago by sof
Modified:
4 years, 5 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

Handle cross-thread weak persistents during global weak processing. r401880 changed the handling of weak persistents, clearing and releasing their underlying PersistentNodes once their weak references point to otherwise unreferenced objects. However, performing that weak processing step cannot reliably be done as part of thread-local weak processing if the weak persistent is a CrossThreadWeakPersistent<T> (CTWP) as the object it refers to may reside on a different thread's heap than where the CTWP resides. If both locations need to be accessed, doing that as part of thread-local weak processing is too late and unsafe. Instead we process the cross-thread weak persistents along with the 'weak cells' during global weak processing. WeakPersistent<>s are still handled during thread-local weak processing. R= BUG=623985 Committed: https://crrev.com/a71167e5645142b200f917bf26b7a546e36a3574 Cr-Commit-Position: refs/heads/master@{#402734}

Patch Set 1 #

Patch Set 2 : only treat cross-thread weaks during global weak processing #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -15 lines) Patch
M third_party/WebKit/Source/platform/heap/MarkingVisitor.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h View 2 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Persistent.h View 1 2 chunks +11 lines, -6 lines 2 comments Download
M third_party/WebKit/Source/platform/heap/Visitor.h View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
sof
please take a look.
4 years, 5 months ago (2016-06-28 21:03:52 UTC) #2
haraken
https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h#newcode191 third_party/WebKit/Source/platform/heap/Persistent.h:191: visitor->registerWeakMembers(this, m_raw, handleWeakPersistent); Is there any reason you don't ...
4 years, 5 months ago (2016-06-29 00:41:55 UTC) #7
sof
https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h#newcode191 third_party/WebKit/Source/platform/heap/Persistent.h:191: visitor->registerWeakMembers(this, m_raw, handleWeakPersistent); On 2016/06/29 00:41:54, haraken wrote: > ...
4 years, 5 months ago (2016-06-29 05:13:47 UTC) #8
haraken
On 2016/06/29 05:13:47, sof wrote: > https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h > File third_party/WebKit/Source/platform/heap/Persistent.h (right): > > https://codereview.chromium.org/2106863003/diff/20001/third_party/WebKit/Source/platform/heap/Persistent.h#newcode191 > ...
4 years, 5 months ago (2016-06-29 05:16:22 UTC) #9
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/2106863003/20001
4 years, 5 months ago (2016-06-29 05:17:50 UTC) #11
sof
There's no shortage of subtlety and surprises when it comes to CrossThread(Weak)Persistents.. :)
4 years, 5 months ago (2016-06-29 05:20:12 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-06-29 05:21:26 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 05:23:31 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a71167e5645142b200f917bf26b7a546e36a3574
Cr-Commit-Position: refs/heads/master@{#402734}

Powered by Google App Engine
This is Rietveld 408576698