Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 31 Jan 2011 10:38:09 +0000 (16:08 +0530)
committerHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 31 Jan 2011 10:38:09 +0000 (16:08 +0530)
commitba7b978690468b0c3431f198d190f01a36eb11ca
tree62d06b249aa9772d3e85adf6a3d4129dcb1b096c
parent1b07db37f69bda36c837033e7443b531229a90bb
Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>

    2011-01-06  Abhishek Arya  <inferno@chromium.org>

            Reviewed by Simon Fraser.

            Null out the parent stylesheet pointer when a css rule is removed.
            https://bugs.webkit.org/show_bug.cgi?id=51993

            Tests: fast/dom/StyleSheet/removed-media-rule-deleted-parent-crash.html
                   fast/dom/StyleSheet/removed-stylesheet-rule-deleted-parent-crash.html

            * css/CSSRuleList.cpp:
            (WebCore::CSSRuleList::deleteRule):
            * css/CSSStyleSheet.cpp:
            (WebCore::CSSStyleSheet::deleteRule):
    2011-01-06  Abhishek Arya  <inferno@chromium.org>

            Reviewed by Simon Fraser.

            Tests that we do not crash when accessing a deleted parent stylesheet
            from a removed css rule.
            https://bugs.webkit.org/show_bug.cgi?id=51993

            * fast/dom/StyleSheet/removed-media-rule-deleted-parent-crash-expected.txt: Added.
            * fast/dom/StyleSheet/removed-media-rule-deleted-parent-crash.html: Added.
            * fast/dom/StyleSheet/removed-stylesheet-rule-deleted-parent-crash-expected.txt: Added.
            * fast/dom/StyleSheet/removed-stylesheet-rule-deleted-parent-crash.html: Added.

    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/removed-media-rule-deleted-parent-crash-expected.txt [new file with mode: 0644]
LayoutTests/removed-media-rule-deleted-parent-crash.html [new file with mode: 0644]
LayoutTests/removed-stylesheet-rule-deleted-parent-crash-expected.txt [new file with mode: 0644]
LayoutTests/removed-stylesheet-rule-deleted-parent-crash.html [new file with mode: 0644]
WebCore/css/CSSRuleList.cpp
WebCore/css/CSSStyleSheet.cpp