Ignore:
Timestamp:
Nov 1, 2013, 4:34:47 PM (12 years ago)
Author:
[email protected]
Message:

CSS 'initial' and 'inherit' value constructors should return PassRef.
<https://webkit.org/b/123641>

Make the helpers involved in constructing CSS{Initial,Inherited}Value
all return PassRef instead of PassRefPtr. This avoids generating
pointless null checks at the call sites.

Reviewed by Darin Adler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSInitialValue.h

    r157769 r158465  
    2929class CSSInitialValue : public CSSValue {
    3030public:
    31     static PassRefPtr<CSSInitialValue> createExplicit()
     31    static PassRef<CSSInitialValue> createExplicit()
    3232    {
    33         return adoptRef(new CSSInitialValue(/* implicit */ false));
     33        return adoptRef(*new CSSInitialValue(/* implicit */ false));
    3434    }
    35     static PassRefPtr<CSSInitialValue> createImplicit()
     35    static PassRef<CSSInitialValue> createImplicit()
    3636    {
    37         return adoptRef(new CSSInitialValue(/* implicit */ true));
     37        return adoptRef(*new CSSInitialValue(/* implicit */ true));
    3838    }
    3939
Note: See TracChangeset for help on using the changeset viewer.