Open Bug 1715427 Opened 3 years ago Updated 3 years ago

Response.blob() promise is rejected when the request URL is revoked after fetch

Categories

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

Firefox 89
defect

Tracking

()

UNCONFIRMED

People

(Reporter: peterho0218, Unassigned)

Details

(Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

Steps to reproduce:

Try the JavaScript code here: https://jsfiddle.net/Quicksilver0218/cbqxz43s/

  1. Click the file input field and select any file.
  2. Look at the console output.

Actual results:

The "Response.blob()" promise is rejected in Firefox.

Expected results:

The "Response.blob()" promise is resolved in Chrome, Edge and Opera.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Networking
Product: Firefox → Core

Anne, it's not entirely clear to me what the spec mandated behaviour is here

Flags: needinfo?(annevk)

Other Body's methods such as arrayBuffer(), json(), text() are still working after revokeObjectURL(). It seems that blob() is the only difference.

This should work. In spec-theory we obtain a reference to the blob when the blob URL is parsed, so it getting revoked after that shouldn't influence the ability to fetch it or turn it into a new blob.

Flags: needinfo?(annevk)
Severity: -- → S3
Priority: -- → P1
Whiteboard: [necko-triaged]

I didn't mean to mark this P1, not sure how that happened.

Priority: P1 → P2
You need to log in before you can comment on or make changes to this bug.