Commit 9244b625 authored by morrita@google.com's avatar morrita@google.com
Browse files

2011-01-17 MORITA Hajime <morrita@google.com>

        Unreviewed crash fix, which introduced at r75995

        * dom/Element.cpp:
        (WebCore::Element::removeShadowRoot):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f939c8ad
2011-01-17 MORITA Hajime <morrita@google.com>
Unreviewed crash fix, which introduced at r75995
* dom/Element.cpp:
(WebCore::Element::removeShadowRoot):
2011-01-17 MORITA Hajime <morrita@google.com>
 
Reviewed by Dimitri Glazkov.
......
......@@ -1103,9 +1103,11 @@ void Element::setShadowRoot(PassRefPtr<Node> node)
void Element::removeShadowRoot()
{
if (ElementRareData* data = rareData()) {
if (!data->m_shadowRoot)
return;
if (!hasRareData())
return;
ElementRareData* data = rareData();
if (data->m_shadowRoot) {
RefPtr<Node> oldRoot = data->m_shadowRoot;
data->m_shadowRoot = 0;
document()->removeFocusedNodeOfSubtree(oldRoot.get());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment