Bug 46326 - Crash when trying to create a NodeIterator rooted at a document-less DocumentType node
Summary: Crash when trying to create a NodeIterator rooted at a document-less Document...
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Blocks: 42959
  Show dependency treegraph
Reported: 2010-09-22 17:53 PDT by Alexey Proskuryakov
Modified: 2019-02-06 09:02 PST (History)
2 users (show)

See Also:

test case (will crash) (140 bytes, text/html)
2010-09-22 17:53 PDT, Alexey Proskuryakov
no flags Details
proposed fix (6.67 KB, patch)
2010-09-23 13:18 PDT, Alexey Proskuryakov
darin: review+
ap: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-09-22 17:53:09 PDT
Created attachment 68481 [details]
test case (will crash)

At some point, someone went over WebCore to fix all issues like this. Either we added new ones, or this just fell through cracks.
Comment 1 Alexey Proskuryakov 2010-09-23 13:18:52 PDT
Created attachment 68577 [details]
proposed fix
Comment 2 Darin Adler 2010-09-23 14:03:03 PDT
Comment on attachment 68577 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=68577&action=review

Since you’re a committer I’ll let you set the commit-queue flag yourself if you decide you don’t want to fix the minor typos and such I mentioned above.

> WebCore/ChangeLog:11
> +        attach/detach may not be always paired.

Tiny grammatical nitpick: "may not always be paired" is better phrasing.

> WebCore/dom/Document.cpp:3217
> +    // The node iterator can be detached wihtout having been atatched if its root node didn't have a document

Typo: "wihtout".
Typo: "atatched".

> LayoutTests/fast/dom/node-iterator-with-doctype-root.html:31
> +iter

Did you put this line in intentionally? If so, what purpose does it serve? Would a comment make that clearer? Would some logging after the fact be helpful?
Comment 3 Alexey Proskuryakov 2010-09-23 14:10:38 PDT
> Did you put this line in intentionally?

I think I was beginning to write some other subtest, but then decided that it wasn't relevant. This line has no effect, so I removed it.

Committed <http://trac.webkit.org/changeset/68195>.
Comment 4 Lucas Forschler 2019-02-06 09:02:51 PST
Mass moving XML DOM bugs to the "DOM" Component.