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

Issue 1265103003: Invalidate cross-thread persistents on heap termination. (Closed)

Created:
5 years, 4 months ago by sof
Modified:
5 years, 4 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Invalidate cross-thread persistents on heap termination. When a thread is detached from Oilpan and its ThreadState is finalized, arrange for any CrossThreadPersistent<>s pointing into one of its heaps to be cleared out. Not doing so risks dangling pointers to be followed upon GC or by anyone else still keeping these CrossThreadPersistent<>s alive. The only operation that other threads are allowed over CrossThreadPersistent<> (CTP) once the ThreadState has been destructed, is to destruct the CTP. R=haraken BUG=515432 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199891

Patch Set 1 #

Patch Set 2 : clarify comments + style tweaks #

Total comments: 7

Patch Set 3 : simplify the invalidation as ref-clearing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -6 lines) Patch
M Source/platform/heap/HeapTest.cpp View 1 2 chunks +18 lines, -3 lines 0 comments Download
M Source/platform/heap/PersistentNode.h View 1 2 4 chunks +10 lines, -0 lines 0 comments Download
M Source/platform/heap/PersistentNode.cpp View 1 2 2 chunks +36 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
sof
please take a look. If you accept the premise that CTPs can live longer than ...
5 years, 4 months ago (2015-08-02 16:29:57 UTC) #2
haraken
Thanks for working on this! Mostly LG. (I think this will be a good step ...
5 years, 4 months ago (2015-08-03 00:45:25 UTC) #4
sof
https://codereview.chromium.org/1265103003/diff/20001/Source/platform/heap/PersistentNode.cpp File Source/platform/heap/PersistentNode.cpp (right): https://codereview.chromium.org/1265103003/diff/20001/Source/platform/heap/PersistentNode.cpp#newcode129 Source/platform/heap/PersistentNode.cpp:129: // into the heaps of each ThreadState & use ...
5 years, 4 months ago (2015-08-03 08:30:04 UTC) #5
haraken
LGTM
5 years, 4 months ago (2015-08-03 09:34:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1265103003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1265103003/40001
5 years, 4 months ago (2015-08-03 09:57:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1265103003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1265103003/40001
5 years, 4 months ago (2015-08-03 09:58:35 UTC) #11
commit-bot: I haz the power
5 years, 4 months ago (2015-08-03 10:40:49 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=199891

Powered by Google App Engine
This is Rietveld 408576698