-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Simplify the FileSpec class, and remove no longer needed polyfills
#20596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.)
…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).
|
/botio test |
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 |
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 |
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 |
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 |
No description provided.