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

Issue 2060553002: GC plugin: improve error reporting when tracing illegal fields. (Closed)

Created:
4 years, 6 months ago by sof
Modified:
4 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GC plugin: improve error reporting when tracing illegal fields. Add detection of trace() calls over smart pointer types that either do not wrap up references to heap objects, or are otherwise not meant to be traced over. In particular, CrossThread(Weak)Persistent<T> fields are now detected as being illegal to trace over. Also consider OwnPtr<T>, RefPtr<T> and std::unique_ptr<T> as illegal to trace over & emit a more concise error messages for these. R= BUG=619149 Committed: https://crrev.com/3ba6089cd6a901b62ff5a0d8f08a2bd818edcbe8 Committed: https://crrev.com/163954bcdf26d970e2166ec2dabadff3c71fd1c8 Cr-Original-Commit-Position: refs/heads/master@{#399861} Cr-Commit-Position: refs/heads/master@{#400653}

Patch Set 1 #

Total comments: 2

Patch Set 2 : tidy namespace checking #

Patch Set 3 : drop back to ps#1 #

Patch Set 4 : robustify namespace equality checking instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -39 lines) Patch
M tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp View 1 3 3 chunks +6 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/CheckFieldsVisitor.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp View 3 chunks +5 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/Config.h View 1 2 chunks +9 lines, -4 lines 0 comments Download
M tools/clang/blink_gc_plugin/DiagnosticsReporter.h View 4 chunks +6 lines, -2 lines 0 comments Download
M tools/clang/blink_gc_plugin/DiagnosticsReporter.cpp View 8 chunks +37 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/Edge.h View 10 chunks +42 lines, -10 lines 0 comments Download
M tools/clang/blink_gc_plugin/Edge.cpp View 3 chunks +17 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.h View 1 3 4 chunks +11 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.cpp View 1 2 3 5 chunks +31 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/TracingStatus.h View 2 chunks +23 lines, -2 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.h View 1 3 1 chunk +56 lines, -0 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.cpp View 1 1 chunk +23 lines, -0 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.txt View 1 3 1 chunk +50 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/heap/stubs.h View 1 2 3 2 chunks +38 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/persistent_field_in_gc_managed_class.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/persistent_field_in_gc_managed_class.txt View 1 chunk +7 lines, -1 line 0 comments Download
A + tools/clang/blink_gc_plugin/tests/persistent_no_trace.h View 2 chunks +5 lines, -5 lines 0 comments Download
A + tools/clang/blink_gc_plugin/tests/persistent_no_trace.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/persistent_no_trace.txt View 1 chunk +10 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/templated_class_with_local_class_requires_trace.txt View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 27 (11 generated)
sof
please take a look (no rush.)
4 years, 6 months ago (2016-06-10 20:44:33 UTC) #3
haraken
LGTM but we should chat with Nico about how/when to land this (in order not ...
4 years, 6 months ago (2016-06-11 05:28:42 UTC) #4
sof
On 2016/06/11 05:28:42, haraken wrote: > LGTM but we should chat with Nico about how/when ...
4 years, 6 months ago (2016-06-11 05:40:19 UTC) #5
sof
On 2016/06/11 05:40:19, sof wrote: > On 2016/06/11 05:28:42, haraken wrote: > > LGTM but ...
4 years, 6 months ago (2016-06-12 07:04:50 UTC) #6
sof
On 2016/06/12 07:04:50, sof wrote: > On 2016/06/11 05:40:19, sof wrote: > > On 2016/06/11 ...
4 years, 6 months ago (2016-06-14 06:54:44 UTC) #7
Nico
lgtm https://codereview.chromium.org/2060553002/diff/1/tools/clang/blink_gc_plugin/RecordInfo.cpp File tools/clang/blink_gc_plugin/RecordInfo.cpp (right): https://codereview.chromium.org/2060553002/diff/1/tools/clang/blink_gc_plugin/RecordInfo.cpp#newcode606 tools/clang/blink_gc_plugin/RecordInfo.cpp:606: if (!ns || ns->getName() != "std") (this isn't ...
4 years, 6 months ago (2016-06-14 11:35:15 UTC) #8
sof
https://codereview.chromium.org/2060553002/diff/1/tools/clang/blink_gc_plugin/RecordInfo.cpp File tools/clang/blink_gc_plugin/RecordInfo.cpp (right): https://codereview.chromium.org/2060553002/diff/1/tools/clang/blink_gc_plugin/RecordInfo.cpp#newcode606 tools/clang/blink_gc_plugin/RecordInfo.cpp:606: if (!ns || ns->getName() != "std") On 2016/06/14 11:35:15, ...
4 years, 6 months ago (2016-06-14 21:01:22 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2060553002/20001
4 years, 6 months ago (2016-06-15 08:32:06 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-15 08:36:01 UTC) #14
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/3ba6089cd6a901b62ff5a0d8f08a2bd818edcbe8 Cr-Commit-Position: refs/heads/master@{#399861}
4 years, 6 months ago (2016-06-15 08:38:20 UTC) #16
Nico
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2068983003/ by thakis@chromium.org. ...
4 years, 6 months ago (2016-06-15 09:38:02 UTC) #17
sof
Dropped back to ps#1, see https://codereview.chromium.org/2068983003/#msg9
4 years, 6 months ago (2016-06-15 19:21:41 UTC) #19
sof
relanding
4 years, 6 months ago (2016-06-20 10:50:15 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2060553002/60001
4 years, 6 months ago (2016-06-20 10:50:37 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-20 11:25:13 UTC) #25
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 11:27:13 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/163954bcdf26d970e2166ec2dabadff3c71fd1c8
Cr-Commit-Position: refs/heads/master@{#400653}

Powered by Google App Engine
This is Rietveld 408576698