Closed Bug 765704 Opened 10 years ago Closed 10 years ago
Don't throw when setting XHR
.response Type to an invalid value
The algorithm at <http://dev.w3.org/2006/webapi/WebIDL/#dfn-attribute-setter> explicitly special-cases enums, so that setting an enum attribute to an unrecognized value silently fails, rather than throwing. We broke that.
We have to fix this before release.
This isn't terribly elegant, but it seems to work, at least.
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
Attachment #634043 - Flags: review?(bzbarsky)
Comment on attachment 634043 [details] [diff] [review] Patch v1 I don't think you need the invalidEnumValueFatal function. Just pass "not setter" in CGPerSignatureCall.__init__ ? r=me. Please add mochtests for XHR here or something to actually exercise this code? Also tests for the fact that the method argument throws...
Attachment #634043 - Flags: review?(bzbarsky) → review+
Comment on attachment 634043 [details] [diff] [review] Patch v1 [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 740069 User impact if declined: scripts can break if they set responseType to something unrecognized Testing completed (on m-c, etc.): passes try <https://tbpl.mozilla.org/?tree=Try&rev=ac41076a1718> Risk to taking this patch (and alternatives if risky): small String or UUID changes made by this patch: none
Looks like we'll get this into all branches with plenty of time but setting tracking anyway in case there are any followup issues.
Comment on attachment 634043 [details] [diff] [review] Patch v1 low risk fix, test included, and we're still nice and early in the beta cycle - approving.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
The test that verified this fix (test_enums.html) is passing on all the OSs: https://tbpl.mozilla.org/php/getParsedLog.php?id=14175380&full=1&branch=mozilla-beta https://tbpl.mozilla.org/php/getParsedLog.php?id=14174727&full=1&branch=mozilla-beta https://tbpl.mozilla.org/php/getParsedLog.php?id=14178339&full=1&branch=mozilla-beta https://tbpl.mozilla.org/php/getParsedLog.php?id=14178942&full=1&branch=mozilla-beta
Component: DOM: Mozilla Extensions → DOM
You need to log in before you can comment on or make changes to this bug.