Bug 165128

Summary: Avoid ref-count churn in DeleteFromTextNodeCommand constructor
Product: WebKit Reporter: Daniel Bates <dbates>
Component: HTML EditingAssignee: Daniel Bates <dbates>
Status: NEW ---    
Severity: Normal CC: aestes, buildbot, enrica, rniwa
Priority: P2    
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
darin: review-, buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews113 for mac-yosemite
none
Archive of layout-test-results from ews107 for mac-yosemite-wk2
none
Archive of layout-test-results from ews121 for ios-simulator-wk2 none

Description Daniel Bates 2016-11-28 17:26:31 PST
In DeleteFromTextNodeCommand::DeleteFromTextNodeCommand() we copy the passed RefPtr<Text> node into DeleteFromTextNodeCommand::m_node. Instead we should WTFMove() it. This has the benefit of avoiding unnecessary ref-count churn.
Comment 1 Daniel Bates 2016-11-28 17:27:12 PST
Created attachment 295556 [details]
Patch
Comment 2 Build Bot 2016-11-28 17:52:59 PST
Comment on attachment 295556 [details]
Patch

Attachment 295556 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2585895

Number of test failures exceeded the failure limit.
Comment 3 Build Bot 2016-11-28 17:53:01 PST
Created attachment 295560 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-11-28 18:13:24 PST
Comment on attachment 295556 [details]
Patch

Attachment 295556 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2585947

Number of test failures exceeded the failure limit.
Comment 5 Build Bot 2016-11-28 18:13:27 PST
Created attachment 295563 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-11-28 18:46:38 PST
Comment on attachment 295556 [details]
Patch

Attachment 295556 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2586102

Number of test failures exceeded the failure limit.
Comment 7 Build Bot 2016-11-28 18:46:40 PST
Created attachment 295566 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 8 Build Bot 2016-11-28 19:22:51 PST
Comment on attachment 295556 [details]
Patch

Attachment 295556 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2586194

Number of test failures exceeded the failure limit.
Comment 9 Build Bot 2016-11-28 19:22:55 PST
Created attachment 295570 [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.11.6
Comment 10 Darin Adler 2016-11-28 19:57:47 PST
Comment on attachment 295556 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295556&action=review

> Source/WebCore/editing/DeleteFromTextNodeCommand.cpp:37
> +    , m_node(WTFMove(node))

The failing tests seem to indicate that there are callers relying on the argument not becoming null; they were presumably doing a WTFMove but counting on it not working. We will need to fix whatever call site or sites is doing that.