Bug 10736 - XMLHttpRequest.responseXML should be null on error
Summary: XMLHttpRequest.responseXML should be null on error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-04 21:53 PDT by Alexey Proskuryakov
Modified: 2006-11-20 12:07 PST (History)
0 users

See Also:


Attachments
proposed patch (6.57 KB, patch)
2006-11-12 05:08 PST, Alexey Proskuryakov
mjs: 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 2006-09-04 21:53:21 PDT
Draft XHR spec says that responseXML must be null if parsing the response fails. But both Firefox and Safari put descriptive error documents there, with our one even being HTML.

WinIE initializes responseXML to an empty document, and keeps it empty after an error. So, the spec doesn't seem to match any major browser, but it still makes sense to me.
Comment 1 Alexey Proskuryakov 2006-11-12 05:08:33 PST
Created attachment 11494 [details]
proposed patch
Comment 2 Darin Adler 2006-11-13 10:51:32 PST
I wonder if this will break any Dashboard widgets. We should test that before landing the change.
Comment 3 Maciej Stachowiak 2006-11-19 21:50:49 PST
Comment on attachment 11494 [details]
proposed patch

r=me
Comment 4 Alexey Proskuryakov 2006-11-20 12:07:15 PST
Committed revision 17860 ( I assume Maciej's r+ meant that this is OK to land).