Open Bug 2021767 Opened 16 days ago Updated 2 days ago

FileSystemWritableFileStream: WriteParams members (size, position, data) should be non-nullable per updated spec

Categories

(Core :: DOM: File, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: usamanadeemparacha, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Steps to reproduce:

The WHATWG File System spec has been updated to make the size, position, and data members of the WriteParams dictionary non-nullable.

Spec change: https://github.com/whatwg/fs/pull/182
Related issue: https://github.com/whatwg/fs/issues/181
WPT tests: https://github.com/web-platform-tests/wpt/pull/58156

Call FileSystemWritableFileStream.write() passing null for size, position, or data in the WriteParams dictionary.

Actual results:

No TypeError is thrown — null is accepted silently or causes unexpected behavior.

Expected results:

A TypeError should be thrown at the WebIDL boundary when null is passed for size, position, or data in WriteParams, as these members are now non-nullable per the updated WHATWG File System spec.

Severity: -- → S3
Flags: needinfo?(jjalkanen)
Priority: -- → P3
Flags: needinfo?(jjalkanen) → needinfo?(bugmail)

Hi, just wanted to provide an update on the status of the upstream spec change that this bug tracks.

Spec PR status (whatwg/fs#182):
The PR removing the nullable markers from WriteParams members (size, position, data) is open and under review: https://github.com/whatwg/fs/pull/182

All requested items have been completed:

Once the spec PR merges, the expectation is that Gecko (and other engines) will need to update their FileSystemWritableFileStream.write() implementation to reject null for these members at the WebIDL boundary.

Happy to provide any additional context needed from the Mozilla side. Thank you!

You need to log in before you can comment on or make changes to this bug.