Closed Bug 918734 Opened 6 years ago Closed 4 years ago

[XHR2] Wrong exception: "Unexpected error" or "failure" is not "DOMException InvalidStateError"

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: hsteen, Assigned: wisniewskit)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Two of those tests are now passing, and this patch fixes the last one: http://w3c-test.org/XMLHttpRequest/open-url-multi-window-3.htm

I'm doing a try run now: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3ebd554b6f5
Assignee: nobody → wisniewskit
Status: NEW → ASSIGNED
Comment on attachment 8770411 [details] [diff] [review]
918734-throw_invalid_state_errors_on_CheckInnerWindowCorrectness_XHR_failures_to_match_the_spec.diff

The try run in comment 1 passed, so I'm requesting review.
Attachment #8770411 - Flags: review?(khuey)
Comment on attachment 8770411 [details] [diff] [review]
918734-throw_invalid_state_errors_on_CheckInnerWindowCorrectness_XHR_failures_to_match_the_spec.diff

Review of attachment 8770411 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/xhr/XMLHttpRequestMainThread.cpp
@@ +1443,5 @@
>        return NS_ERROR_DOM_SYNTAX_ERR;
>      }
>      return rv;
>    }
> +  if (NS_WARN_IF(NS_FAILED(CheckInnerWindowCorrectness()))) {

nit: add a \n above the if
Attachment #8770411 - Flags: review?(khuey) → review+
Nit addressed, carrying over r+. Thanks for the review!
Attachment #8770411 - Attachment is obsolete: true
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6afd23d2579f
Throw invalid state errors when XHRs fail their CheckInnerWindowCorrectness() checks, to match the XHR spec. r=khuey
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6afd23d2579f
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.