Closed Bug 1546041 Opened 1 year ago Closed 1 year ago

Should throw a TypeError on attempts to construct Request with mode=navigate

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: twisniewski, Assigned: kershaw)

References

()

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Step 18 in the fetch spec for the Request constructor [1] indicates that we should throw a TypeError if mode=navigate, which we currently do not do, thus failing the related WPT.

[1] https://fetch.spec.whatwg.org/#ref-for-dfn-throw%E2%91%A0%E2%91%A7

Priority: -- → P2
Whiteboard: [necko-triaged]

The code [1] was complied with the spec before, but it was changed in bug 1298823.
This looks like a spec issue to me.

Anne, what do you think?

[1] https://searchfox.org/mozilla-central/rev/d9c74941343fb85bf6e793983268ad4a201b47b6/dom/fetch/Request.cpp#341

Flags: needinfo?(annevk)

Throwing less often was about the first argument being a Request object whose mode is "navigate", right? This is about the second argument being an object whose mode member is "navigate". That should still throw.

Flags: needinfo?(annevk)
Assignee: nobody → kershaw
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b6338393cc7
Throw TypeError if mode is Navigate r=baku
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/284a94a4c772
Throw TypeError if mode is Navigate r=baku
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.