[Webkit-unassigned] [Bug 51914] ElementRareData::m_shadowRoot should not be RefPtr.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 17 09:03:27 PST 2011


Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:

           What    |Removed                     |Added
  Attachment #79147|review?                     |review-
               Flag|                            |

--- Comment #4 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2011-01-17 09:03:27 PST ---
(From update of attachment 79147)
View in context: https://bugs.webkit.org/attachment.cgi?id=79147&action=review

> Source/WebCore/dom/Element.cpp:1090
>  void Element::setShadowRoot(PassRefPtr<Node> node)

We're not passing RefPtr anymore, since it'll be stored as a raw ptr. Should we still have PassRefPtr as an argument?

> Source/WebCore/dom/Element.cpp:1110
> +    ElementRareData* data = rareData();
> +    if (data->m_shadowRoot) {

Could be written in one line as "if (ElementRareData* data = rareData()) {"

> Source/WebCore/dom/Element.cpp:1111
> +        RefPtr<Node> oldRoot = adoptRef(data->m_shadowRoot);

adoptRef, are you sure? You actually  do want to increment the ref count here.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list