createRareData should return a PassOwnPtr
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2012 22:42:23 +0000 (22:42 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2012 22:42:23 +0000 (22:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103851

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-12-04
Reviewed by Eric Seidel.

createRareData should return a PassOwnPtr, not an OwnPtr since it's
transfering ownership.

* dom/Element.cpp:
(WebCore::Element::createRareData):
* dom/Element.h:
(Element):
* dom/Node.cpp:
(WebCore::Node::createRareData):
* dom/Node.h:

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

Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h

index e32191d..d22cb39 100644 (file)
@@ -1,3 +1,21 @@
+2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
+
+        createRareData should return a PassOwnPtr
+        https://bugs.webkit.org/show_bug.cgi?id=103851
+
+        Reviewed by Eric Seidel.
+
+        createRareData should return a PassOwnPtr, not an OwnPtr since it's
+        transfering ownership.
+
+        * dom/Element.cpp:
+        (WebCore::Element::createRareData):
+        * dom/Element.h:
+        (Element):
+        * dom/Node.cpp:
+        (WebCore::Node::createRareData):
+        * dom/Node.h:
+
 2012-12-04  Filip Pizlo  <fpizlo@apple.com>
 
         Rename Profiler to LegacyProfiler
index 4dc0c5d..4361f99 100644 (file)
@@ -207,8 +207,8 @@ inline ElementRareData* Element::ensureElementRareData()
 {
     return static_cast<ElementRareData*>(ensureRareData());
 }
-    
-OwnPtr<NodeRareData> Element::createRareData()
+
+PassOwnPtr<NodeRareData> Element::createRareData()
 {
     return adoptPtr(new ElementRareData(documentInternal()));
 }
index a24594f..c10f287 100644 (file)
@@ -540,7 +540,7 @@ private:
     virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
 
     QualifiedName m_tagName;
-    virtual OwnPtr<NodeRareData> createRareData();
+    virtual PassOwnPtr<NodeRareData> createRareData();
     bool rareDataStyleAffectedByEmpty() const;
     bool rareDataChildrenAffectedByHover() const;
     bool rareDataChildrenAffectedByActive() const;
index d2fbb16..a85592d 100644 (file)
@@ -466,7 +466,7 @@ NodeRareData* Node::ensureRareData()
     return data;
 }
 
-OwnPtr<NodeRareData> Node::createRareData()
+PassOwnPtr<NodeRareData> Node::createRareData()
 {
     return adoptPtr(new NodeRareData(documentInternal()));
 }
index 5bdfbea..41dabc3 100644 (file)
@@ -793,7 +793,7 @@ private:
     virtual void refEventTarget();
     virtual void derefEventTarget();
 
-    virtual OwnPtr<NodeRareData> createRareData();
+    virtual PassOwnPtr<NodeRareData> createRareData();
     bool rareDataFocused() const;
 
     virtual RenderStyle* nonRendererStyle() const { return 0; }