Bug 33752 - Assertion failure when getting a href attribute with prefix
Summary: Assertion failure when getting a href attribute with prefix
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:
Reported: 2010-01-15 19:27 PST by Alexey Proskuryakov
Modified: 2019-02-06 09:03 PST (History)
2 users (show)

See Also:

proposed fix (10.04 KB, patch)
2010-01-15 19:37 PST, Alexey Proskuryakov
darin: review+
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-01-15 19:27:04 PST
NamedNodeMap::getAttributeItem() reasonably assumes that an attribute with null namespace will also have a null prefix. But we actually let one create nodes with null namespace and non-null prefix, due to a bug introduced in <http://trac.webkit.org/changeset/9639>.

Patch forthcoming.
Comment 1 Alexey Proskuryakov 2010-01-15 19:37:49 PST
Created attachment 46727 [details]
proposed fix
Comment 2 Darin Adler 2010-01-16 10:39:37 PST
Comment on attachment 46727 [details]
proposed fix

Normally if you are comparing an atomic string to a string constant, we use an atomic string constant to make the check less expensive.

I suggest we add the strings "xmlns", "http://www.w3.org/2000/xmlns/", and "xml" all to XMLNames.h alongside xmlNamespaceURI and use named constants instead of literal strings.

I'm going to say review+ but I am close to a review- because I'd like us to use atomic strings when comparing with other atomic strings.
Comment 3 Darin Adler 2010-01-16 11:48:34 PST
Comment on attachment 46727 [details]
proposed fix

Oops, I said review+ but then chose review-!
Comment 4 Alexey Proskuryakov 2010-01-16 12:54:27 PST
Committed <http://trac.webkit.org/changeset/53363>.
Comment 5 Lucas Forschler 2019-02-06 09:03:22 PST
Mass moving XML DOM bugs to the "DOM" Component.