Bug 165128 - Avoid ref-count churn in DeleteFromTextNodeCommand constructor
Summary: Avoid ref-count churn in DeleteFromTextNodeCommand constructor
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 17:26 PST by Daniel Bates
Modified: 2016-11-28 19:58 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2016-11-28 17:27 PST, Daniel Bates
darin: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (1.39 MB, application/zip)
2016-11-28 17:53 PST, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-yosemite (691.86 KB, application/zip)
2016-11-28 18:13 PST, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (1.06 MB, application/zip)
2016-11-28 18:46 PST, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (deleted)
2016-11-28 19:22 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.