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

Issue 2592063002: SameThreadCheckedMember<>: verify same-thread usage of heap references. (Closed)

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

Description

SameThreadCheckedMember<>: verify same-thread usage of heap references. In debug builds, Member<> checks that the heap references stored resides in a heap belonging to the same thread as the Member<> itself. The check carries some overhead, hence it is not enabled outside of checked builds. In order to be able to diagnose and catch code that incorrectly stores heap pointers belonging to other threads in a Member<>, add the SameThreadCheckedMember<> variant of Member<>. A drop-in replacement for Member<> that can be used to selectively diagnose. R= BUG= Committed: https://crrev.com/a9f54eaa205a364f6f33260d7d768f8237a0f439 Cr-Commit-Position: refs/heads/master@{#440117}

Patch Set 1 #

Patch Set 2 : clang compile fix #

Patch Set 3 : clang compile fix, pt2 #

Total comments: 2

Patch Set 4 : emphasize that the extended Member is for diagnosing/debugging #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -0 lines) Patch
M third_party/WebKit/Source/platform/heap/HeapAllocator.h View 2 chunks +51 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Member.h View 1 2 3 3 chunks +141 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadingTraits.h View 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/TraceTraits.h View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Visitor.h View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (17 generated)
sof
please take a look. (any use of this extra will be landed separately in followups.)
4 years ago (2016-12-21 12:21:57 UTC) #4
haraken
https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h File third_party/WebKit/Source/platform/heap/Member.h (right): https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h#newcode261 third_party/WebKit/Source/platform/heap/Member.h:261: class SameThreadCheckedMember : public Member<T> { Instead of introducing ...
4 years ago (2016-12-21 12:52:16 UTC) #12
sof
https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h File third_party/WebKit/Source/platform/heap/Member.h (right): https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h#newcode261 third_party/WebKit/Source/platform/heap/Member.h:261: class SameThreadCheckedMember : public Member<T> { On 2016/12/21 12:52:16, ...
4 years ago (2016-12-21 12:56:36 UTC) #13
haraken
On 2016/12/21 12:56:36, sof wrote: > https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h > File third_party/WebKit/Source/platform/heap/Member.h (right): > > https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h#newcode261 > ...
4 years ago (2016-12-21 13:18:35 UTC) #14
sof
On 2016/12/21 13:18:35, haraken wrote: > On 2016/12/21 12:56:36, sof wrote: > > > https://codereview.chromium.org/2592063002/diff/40001/third_party/WebKit/Source/platform/heap/Member.h ...
4 years ago (2016-12-21 13:23:22 UTC) #15
haraken
On 2016/12/21 13:23:22, sof wrote: > On 2016/12/21 13:18:35, haraken wrote: > > On 2016/12/21 ...
4 years ago (2016-12-21 13:28:56 UTC) #16
haraken
On 2016/12/21 13:28:56, haraken wrote: > On 2016/12/21 13:23:22, sof wrote: > > On 2016/12/21 ...
4 years ago (2016-12-21 13:29:47 UTC) #17
sof
On 2016/12/21 13:29:47, haraken wrote: > On 2016/12/21 13:28:56, haraken wrote: > > On 2016/12/21 ...
4 years ago (2016-12-21 13:36:31 UTC) #18
sof
Added a comment to emphasize that this intended for temporary diagnosing, but couldn't think of ...
4 years ago (2016-12-21 14:29:29 UTC) #21
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/2592063002/60001
4 years ago (2016-12-21 14:29:56 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-21 16:15:38 UTC) #27
commit-bot: I haz the power
4 years ago (2016-12-21 16:17:45 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a9f54eaa205a364f6f33260d7d768f8237a0f439
Cr-Commit-Position: refs/heads/master@{#440117}

Powered by Google App Engine
This is Rietveld 408576698