CSSFunctionValue constructors should return PassRef.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Dec 2013 05:41:37 +0000 (05:41 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Dec 2013 05:41:37 +0000 (05:41 +0000)
<https://webkit.org/b/125054>

Make CSSFunctionValue::create() helpers return PassRef instead of
PassRefPtr since they will never return null.

Reviewed by Anders Carlsson.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/CSSFunctionValue.h

index 95fd673c0595810ae3929cc6ec04d6bd40e93320..85c49b550cd7801f3a0783af2b88b5884ef1caa7 100644 (file)
@@ -1,3 +1,13 @@
+2013-12-01  Andreas Kling  <akling@apple.com>
+
+        CSSFunctionValue constructors should return PassRef.
+        <https://webkit.org/b/125054>
+
+        Make CSSFunctionValue::create() helpers return PassRef instead of
+        PassRefPtr since they will never return null.
+
+        Reviewed by Anders Carlsson.
+
 2013-12-01  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r159764.
index 0d493517beb58ae0fb178f9f9a9a73159ba00ff9..14b3c51b65994005eeb0bde4a63af4382433dd9f 100644 (file)
@@ -35,14 +35,14 @@ struct CSSParserFunction;
 
 class CSSFunctionValue : public CSSValue {
 public:
-    static PassRefPtr<CSSFunctionValue> create(CSSParserFunction* function)
+    static PassRef<CSSFunctionValue> create(CSSParserFunction* function)
     {
-        return adoptRef(new CSSFunctionValue(function));
+        return adoptRef(*new CSSFunctionValue(function));
     }
 
-    static PassRefPtr<CSSFunctionValue> create(String name, PassRefPtr<CSSValueList> args)
+    static PassRef<CSSFunctionValue> create(String name, PassRefPtr<CSSValueList> args)
     {
-        return adoptRef(new CSSFunctionValue(name, args));
+        return adoptRef(*new CSSFunctionValue(name, args));
     }
 
     String customCSSText() const;