Uh oh!
There was an error while loading. Please reload this page.
Simplify the FileSpec class, and remove no longer needed polyfills - #20596
Conversation
Also, tweak code/comment used when handling "GoToR" destinations.
…e code Given that only the `FileSpec.prototype.serializable` getter is ever invoked from "outside" of the class, and only once per `FileSpec`-instance, the caching/shadowing isn't actually necessary. Furthermore the `_contentRef`-caching wasn't actually correct, since it ended up storing a `BaseStream`-instance and those should *generally* never be cached. (Since calling `BaseStream.prototype.getBytes()` more than once, without resetting the stream in between, will return an empty TypedArray after the first time.)
Snuffleupagus
commented
Jan 25, 2026
/botio test |
moz-tools-bot
commented
Jan 25, 2026
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/8e4202c8d4a1b03/output.txt |
moz-tools-bot
commented
Jan 25, 2026
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/7390f958a03e63c/output.txt |
moz-tools-bot
commented
Jan 25, 2026
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/7390f958a03e63c/output.txt Total script time: 41.68 mins
Image differences available at: http://54.241.84.105:8877/7390f958a03e63c/reftest-analyzer.html#web=eq.log |
moz-tools-bot
commented
Jan 25, 2026
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/8e4202c8d4a1b03/output.txt Total script time: 81.73 mins
Image differences available at: http://54.193.163.58:8877/8e4202c8d4a1b03/reftest-analyzer.html#web=eq.log |
…totype.serializable` It's more correct to return the `rawFilename` as-is, and limit the fallback for empty filenames to only the `filename` property.
(During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.) Note: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try#browser_compatibility - https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
…se64()`, and `Uint8Array.fromBase64()` polyfills (During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.) See: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toHex#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64#browser_compatibility Note that technically this functionality can still be disabled via a preference in Firefox, however that's slated for removal in [bug 1985120](https://bugzilla.mozilla.org/show_bug.cgi?id=1985120). Looking at the Firefox source-code, see https://searchfox.org/firefox-main/search?q=array.tobase64%28%29&path=&case=false®exp=false, you can see that it's already being used *unconditionally* elsewhere in the browser hence removing the polyfills ought to be fine (since toggling the preference would break other parts of the browser).
6e46246 to
5b368ddCompareUh oh!
There was an error while loading. Please reload this page.
timvandermeij
commented
Jan 29, 2026
Thank you for improving this code! |
No description provided.