Bug 19526

Summary: ASSERTION FAILED: m_numNodeListCaches
Product: WebKit Reporter: danceoffwithyourpantsoff <danceoffwithyourpantsoff>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin, mitz, sam, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case (will assert)
none
patch sam: review+

danceoffwithyourpantsoff
Reported 2008-06-12 15:54:23 PDT
var doc = document.implementation.createHTMLDocument('a'); Node's can cache nodelists in m_nodeLists. They keep a counter on their document, via document()->addNodeListCache and document()->removeNodeListCache. However, when a node is adopted between documents, nothing is done to keep this balance. On adoption, we should be clearing m_nodeLists and calling document()->removeNodeListCache. var b = document.createElement('b'); // Give it a node list cache on document b.childNodes; // Attach it to doc to update m_document doc.adoptNode(b); doc.body.appendChild(b); doc.body.removeChild(b); // GC here if you can, or reload the page to fire ~Node and cleanup m_nodeLists
Attachments
test case (will assert) (345 bytes, text/html)
2008-06-12 21:49 PDT, Alexey Proskuryakov
no flags
patch (5.29 KB, patch)
2009-12-22 16:21 PST, Darin Adler
sam: review+
Alexey Proskuryakov
Comment 1 2008-06-12 21:49:52 PDT
Created attachment 21670 [details] test case (will assert)
Alexey Proskuryakov
Comment 2 2008-06-12 21:50:58 PDT
Confirmed with r34513.
mitz
Comment 3 2009-11-29 17:28:42 PST
Are there any symptoms in release builds?
mitz
Comment 4 2009-11-30 15:52:55 PST
Darin Adler
Comment 5 2009-12-22 14:49:09 PST
I see no reason to clear m_nodeLists.
Darin Adler
Comment 6 2009-12-22 16:21:45 PST
WebKit Review Bot
Comment 7 2009-12-22 16:26:05 PST
style-queue ran check-webkit-style on attachment 45410 [details] without any errors.
Sam Weinig
Comment 8 2009-12-22 16:29:02 PST
Comment on attachment 45410 [details] patch > \ No newline at end of file r=me
Darin Adler
Comment 9 2009-12-22 16:51:17 PST
Note You need to log in before you can comment on or make changes to this bug.