WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179218
Replace some auto* with RefPtr within WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=179218
Summary
Replace some auto* with RefPtr within WebCore/html
Jiewen Tan
Reported
2017-11-02 17:26:48 PDT
Convert auto* to RefPtr within WebCore/html if appropriate.
Attachments
Patch
(101.46 KB, patch)
2017-11-02 17:40 PDT
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(526.41 KB, application/zip)
2017-11-02 18:25 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(675.94 KB, application/zip)
2017-11-02 18:30 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews117 for mac-elcapitan
(761.11 KB, application/zip)
2017-11-02 18:32 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(1.01 MB, application/zip)
2017-11-02 18:37 PDT
,
Build Bot
no flags
Details
Patch
(102.51 KB, patch)
2017-11-02 19:29 PDT
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-elcapitan
(770.64 KB, application/zip)
2017-11-02 20:12 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(845.85 KB, application/zip)
2017-11-02 20:17 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews116 for mac-elcapitan
(708.96 KB, application/zip)
2017-11-02 20:25 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(903.84 KB, application/zip)
2017-11-02 20:35 PDT
,
Build Bot
no flags
Details
Patch
(102.15 KB, patch)
2017-11-02 21:02 PDT
,
Jiewen Tan
rniwa
: review+
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(1.79 MB, application/zip)
2017-11-02 21:47 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews102 for mac-elcapitan
(1.01 MB, application/zip)
2017-11-02 21:50 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews114 for mac-elcapitan
(818.58 KB, application/zip)
2017-11-02 21:55 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews124 for ios-simulator-wk2
(1.30 MB, application/zip)
2017-11-02 22:13 PDT
,
Build Bot
no flags
Details
Patch for landing
(101.40 KB, patch)
2017-11-03 01:11 PDT
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(14)
View All
Add attachment
proposed patch, testcase, etc.
Jiewen Tan
Comment 1
2017-11-02 17:27:49 PDT
<
rdar://problem/35102567
>
Jiewen Tan
Comment 2
2017-11-02 17:40:44 PDT
Created
attachment 325804
[details]
Patch
Build Bot
Comment 3
2017-11-02 18:25:29 PDT
Comment hidden (obsolete)
Comment on
attachment 325804
[details]
Patch
Attachment 325804
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5083053
Number of test failures exceeded the failure limit.
Build Bot
Comment 4
2017-11-02 18:25:30 PDT
Comment hidden (obsolete)
Created
attachment 325812
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 5
2017-11-02 18:30:27 PDT
Comment hidden (obsolete)
Comment on
attachment 325804
[details]
Patch
Attachment 325804
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5083067
Number of test failures exceeded the failure limit.
Build Bot
Comment 6
2017-11-02 18:30:28 PDT
Comment hidden (obsolete)
Created
attachment 325813
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 7
2017-11-02 18:32:06 PDT
Comment hidden (obsolete)
Comment on
attachment 325804
[details]
Patch
Attachment 325804
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5083042
Number of test failures exceeded the failure limit.
Build Bot
Comment 8
2017-11-02 18:32:07 PDT
Comment hidden (obsolete)
Created
attachment 325814
[details]
Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 9
2017-11-02 18:37:47 PDT
Comment hidden (obsolete)
Comment on
attachment 325804
[details]
Patch
Attachment 325804
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/5083011
Number of test failures exceeded the failure limit.
Build Bot
Comment 10
2017-11-02 18:37:48 PDT
Comment hidden (obsolete)
Created
attachment 325817
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Jiewen Tan
Comment 11
2017-11-02 19:29:31 PDT
Created
attachment 325822
[details]
Patch
Build Bot
Comment 12
2017-11-02 20:12:06 PDT
Comment hidden (obsolete)
Comment on
attachment 325822
[details]
Patch
Attachment 325822
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5084094
Number of test failures exceeded the failure limit.
Build Bot
Comment 13
2017-11-02 20:12:07 PDT
Comment hidden (obsolete)
Created
attachment 325828
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 14
2017-11-02 20:17:28 PDT
Comment hidden (obsolete)
Comment on
attachment 325822
[details]
Patch
Attachment 325822
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5084136
Number of test failures exceeded the failure limit.
Build Bot
Comment 15
2017-11-02 20:17:29 PDT
Comment hidden (obsolete)
Created
attachment 325829
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 16
2017-11-02 20:25:54 PDT
Comment hidden (obsolete)
Comment on
attachment 325822
[details]
Patch
Attachment 325822
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5084149
Number of test failures exceeded the failure limit.
Build Bot
Comment 17
2017-11-02 20:25:56 PDT
Comment hidden (obsolete)
Created
attachment 325836
[details]
Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 18
2017-11-02 20:35:46 PDT
Comment hidden (obsolete)
Comment on
attachment 325822
[details]
Patch
Attachment 325822
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/5084208
Number of test failures exceeded the failure limit.
Build Bot
Comment 19
2017-11-02 20:35:47 PDT
Comment hidden (obsolete)
Created
attachment 325837
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Jiewen Tan
Comment 20
2017-11-02 21:02:39 PDT
Created
attachment 325839
[details]
Patch
Ryosuke Niwa
Comment 21
2017-11-02 21:14:34 PDT
Comment on
attachment 325839
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325839&action=review
> Source/WebCore/accessibility/AXObjectCache.cpp:1526 > + RefPtr<HTMLElement> correspondingControl = downcast<HTMLLabelElement>(*element).control();
We can't use makeRefPtr & auto here?
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2527 > - HTMLElement* correspondingControl = labelElement->control(); > + RefPtr<HTMLElement> correspondingControl = labelElement->control();
Ditto.
Ryosuke Niwa
Comment 22
2017-11-02 21:24:08 PDT
Comment on
attachment 325839
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325839&action=review
> Source/WebCore/accessibility/AccessibilityTable.cpp:396 > + if (RefPtr<HTMLTableCaptionElement> caption = tableElement->caption()) {
Use auto?
> Source/WebCore/accessibility/AccessibilityTable.cpp:690 > - if (HTMLTableCaptionElement* caption = downcast<HTMLTableElement>(*tableElement).caption()) > + if (RefPtr<HTMLTableCaptionElement> caption = downcast<HTMLTableElement>(*tableElement).caption())
Ditto.
> Source/WebCore/html/HTMLSummaryElement.cpp:76 > + auto parent = makeRefPtr(parentElement());
It's a bit silly to use a RefPtr here since we're just downcast'ing to another pointer type. I think it's okay to keep parent & host raw pointers as long as the return type is a RefPtr.
> Source/WebCore/html/HTMLTableRowElement.cpp:59 > - auto* parent = row.parentNode(); > + auto parent = makeRefPtr(row.parentNode());
Again, not certain if it's worth converting these local variables to RefPtr since they're just casted to another pointer type.
Jiewen Tan
Comment 23
2017-11-02 21:43:52 PDT
Comment on
attachment 325839
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325839&action=review
Thanks Ryosuke for r+ my patch. I will fix all crashes before landing the patch.
>> Source/WebCore/accessibility/AXObjectCache.cpp:1526 >> + RefPtr<HTMLElement> correspondingControl = downcast<HTMLLabelElement>(*element).control(); > > We can't use makeRefPtr & auto here?
Fixed.
>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2527 >> + RefPtr<HTMLElement> correspondingControl = labelElement->control(); > > Ditto.
Fixed.
>> Source/WebCore/accessibility/AccessibilityTable.cpp:396 >> + if (RefPtr<HTMLTableCaptionElement> caption = tableElement->caption()) { > > Use auto?
Fixed.
>> Source/WebCore/accessibility/AccessibilityTable.cpp:690 >> + if (RefPtr<HTMLTableCaptionElement> caption = downcast<HTMLTableElement>(*tableElement).caption()) > > Ditto.
Fixed.
>> Source/WebCore/html/HTMLSummaryElement.cpp:76 >> + auto parent = makeRefPtr(parentElement()); > > It's a bit silly to use a RefPtr here since we're just downcast'ing to another pointer type. > I think it's okay to keep parent & host raw pointers as long as the return type is a RefPtr.
Fixed.
>> Source/WebCore/html/HTMLTableRowElement.cpp:59 >> + auto parent = makeRefPtr(row.parentNode()); > > Again, not certain if it's worth converting these local variables to RefPtr since they're just casted to another pointer type.
Fixed.
Build Bot
Comment 24
2017-11-02 21:47:39 PDT
Comment hidden (obsolete)
Comment on
attachment 325839
[details]
Patch
Attachment 325839
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5085143
Number of test failures exceeded the failure limit.
Build Bot
Comment 25
2017-11-02 21:47:40 PDT
Comment hidden (obsolete)
Created
attachment 325843
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 26
2017-11-02 21:50:18 PDT
Comment hidden (obsolete)
Comment on
attachment 325839
[details]
Patch
Attachment 325839
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5085221
Number of test failures exceeded the failure limit.
Build Bot
Comment 27
2017-11-02 21:50:20 PDT
Comment hidden (obsolete)
Created
attachment 325845
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 28
2017-11-02 21:55:15 PDT
Comment hidden (obsolete)
Comment on
attachment 325839
[details]
Patch
Attachment 325839
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5085201
Number of test failures exceeded the failure limit.
Build Bot
Comment 29
2017-11-02 21:55:16 PDT
Comment hidden (obsolete)
Created
attachment 325848
[details]
Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 30
2017-11-02 22:13:31 PDT
Comment hidden (obsolete)
Comment on
attachment 325839
[details]
Patch
Attachment 325839
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/5085251
Number of test failures exceeded the failure limit.
Build Bot
Comment 31
2017-11-02 22:13:32 PDT
Comment hidden (obsolete)
Created
attachment 325851
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Jiewen Tan
Comment 32
2017-11-03 01:11:59 PDT
Created
attachment 325874
[details]
Patch for landing
WebKit Commit Bot
Comment 33
2017-11-03 02:32:09 PDT
Comment on
attachment 325874
[details]
Patch for landing Clearing flags on attachment: 325874 Committed
r224390
: <
https://trac.webkit.org/changeset/224390
>
zalan
Comment 34
2017-11-17 17:04:03 PST
(In reply to WebKit Commit Bot from
comment #33
)
> Comment on
attachment 325874
[details]
> Patch for landing > > Clearing flags on attachment: 325874 > > Committed
r224390
: <
https://trac.webkit.org/changeset/224390
>
regression ->
bug 179854
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug