REGRESSION(r133492): Heap-use-after-free in WebCore::Element::normalizeAttributes
<http://webkit.org/b/104488>

Reviewed by Antti Koivisto.

Source/WebCore:

Don't cache the AttrNodeList* in a local when iterating over an Element's Attr nodes since
that pointer may go stale if JS runs in response to a DOMSubtreeModified event below Node::normalize().

Test: fast/dom/normalize-attributes-mutation-event-crash.html

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

LayoutTests:

* fast/dom/normalize-attributes-mutation-event-crash-expected.txt: Added.
* fast/dom/normalize-attributes-mutation-event-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed