Changeset 209079 in webkit


Ignore:
Timestamp:
Nov 29, 2016 11:02:54 AM (7 years ago)
Author:
dbates@webkit.org
Message:

Avoid ref-count churn in ShadowParseContext::commitColor()
https://bugs.webkit.org/show_bug.cgi?id=165125

Reviewed by Simon Fraser.

Avoid ref-count churn in ShadowParseContext::commitColor() by moving the passed
color into its instance variable.

Also modified ShadowParseContext::commitColor() to take a Ref<> instead of a
RefPtr<> because it is never passed a nullptr.

  • css/parser/CSSParser.cpp:

(WebCore::ShadowParseContext::commitColor):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209078 r209079  
     12016-11-29  Daniel Bates  <dabates@apple.com>
     2
     3        Avoid ref-count churn in ShadowParseContext::commitColor()
     4        https://bugs.webkit.org/show_bug.cgi?id=165125
     5
     6        Reviewed by Simon Fraser.
     7
     8        Avoid ref-count churn in ShadowParseContext::commitColor() by moving the passed
     9        color into its instance variable.
     10
     11        Also modified ShadowParseContext::commitColor() to take a Ref<> instead of a
     12        RefPtr<> because it is never passed a nullptr.
     13
     14        * css/parser/CSSParser.cpp:
     15        (WebCore::ShadowParseContext::commitColor):
     16
    1172016-11-29  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebCore/css/parser/CSSParser.cpp

    r208985 r209079  
    78987898    }
    78997899
    7900     void commitColor(RefPtr<CSSPrimitiveValue>&& val)
     7900    void commitColor(Ref<CSSPrimitiveValue>&& value)
    79017901    {
    7902         color = val;
     7902        color = WTFMove(value);
    79037903        allowColor = false;
    79047904        if (allowX) {
Note: See TracChangeset for help on using the changeset viewer.