WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12194
Trying to access XMLHttpRequest.responseText or responseXML when they are not available should raise an exception
https://bugs.webkit.org/show_bug.cgi?id=12194
Summary
Trying to access XMLHttpRequest.responseText or responseXML when they are not...
Alexey Proskuryakov
Reported
2007-01-10 04:01:22 PST
From XMLHttpRequest spec draft: ------------------------ responseText of type DOMString, readonly If the state is not receiving or loaded, the user agent must raise an INVALID_STATE_ERR exception. ... responseXML of type Document, readonly If the state is not loaded, user agents must raise an INVALID_STATE_ERR exception. ------------------------
Attachments
Patch + test cases
(14.26 KB, patch)
2007-11-15 19:09 PST
,
Julien Chaffraix
darin
: review+
Details
Formatted Diff
Diff
Patches updated with Darin's comments
(14.40 KB, patch)
2007-11-17 18:48 PST
,
Julien Chaffraix
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2007-11-15 19:09:34 PST
Created
attachment 17309
[details]
Patch + test cases Tested other browsers' behaviour : IE 7: raises an exception if readyState is not Loaded in both tests Firefox: does not raise any exception in both tests Opera: Fully implements the standard. Judging from the results, I have sided with the specification (which is close to IE behaviour) and fully implemented it. Patch tested on mac without any regression.
Darin Adler
Comment 2
2007-11-16 20:08:44 PST
Comment on
attachment 17309
[details]
Patch + test cases + if (responseXML) return toJS(exec, responseXML); - return jsNull(); + else + return jsNull(); We normally do *not* do else after return in the WebKit project. + if (m_state < Receiving) { + ec = INVALID_STATE_ERR; + } We do not put braces around single-line bodies of if statements. +Should see "PASS" four times: + +PASSED +PASSED +PASSED +PASSED Probably should say "PASSED" or "PASS" consistently. Change looks good, so I'll say r=me, but it would be nice to fix these minor style issues.
Julien Chaffraix
Comment 3
2007-11-17 18:48:39 PST
Created
attachment 17333
[details]
Patches updated with Darin's comments
David Kilzer (:ddkilzer)
Comment 4
2007-11-17 21:21:12 PST
Comment on
attachment 17333
[details]
Patches updated with Darin's comments Please set the "review?" flag, not the "review+" flag. Thanks!
Darin Adler
Comment 5
2007-11-17 22:50:35 PST
Comment on
attachment 17333
[details]
Patches updated with Darin's comments r=me
Mark Rowe (bdash)
Comment 6
2007-11-19 04:31:19 PST
Landed in
r27898
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug