-
rdar://problem/5609579mrowe@apple.com authored
Fix <rdar://problem/5609579> (DOMParser().parseFromString() freezes Safari when parsing large nodes with XML entities) http://bugs.webkit.org/show_bug.cgi?id=16076 Reviewed by Maciej Stachowiak. XMLTokenizer was calling CharacterData::appendData twice per entity in the fragment of XML being parsed (once for text before the entity, once for the entity itself). This triggered O(n^2) copying of the CharacterData's string due to resizing. We now prevent this happening by buffering all the content for a given Text node in the XMLTokenizer before sending it out to the node in a single go. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7303b221