Bug 165127 - Avoid ref-count churn in CSSParser::ValueWithCalculation::setCalculation()
Summary: Avoid ref-count churn in CSSParser::ValueWithCalculation::setCalculation()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (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:21 PST by Daniel Bates
Modified: 2016-11-29 10:53 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.40 KB, patch)
2016-11-28 17:21 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2016-11-28 17:21:15 PST
In CSSParser::ValueWithCalculation::setCalculation() we copy the passed RefPtr into CSSParser::ValueWithCalculation::m_calculation. Instead we should WTFMove() it. This has the benefit of avoiding unnecessary ref-count churn.
Comment 1 Daniel Bates 2016-11-28 17:21:46 PST
Created attachment 295555 [details]
Patch
Comment 2 Daniel Bates 2016-11-29 10:53:27 PST
Comment on attachment 295555 [details]
Patch

Clearing flags on attachment: 295555

Committed r209078: <http://trac.webkit.org/changeset/209078>
Comment 3 Daniel Bates 2016-11-29 10:53:31 PST
All reviewed patches have been landed.  Closing bug.