-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[api-minor] Stop exposing the createObjectURL
helper function in the API
#14551
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
[api-minor] Stop exposing the createObjectURL
helper function in the API
#14551
Conversation
…her than the `createObjectURL` helper function Given that most of the code-base is already using native functionality, we can update these unit-tests similarily as well. - For the `blob:`-URL test, we simply use `URL.createObjectURL(...)` and `Blob` directly instead. - For the `data:`-URL test, we simply use `btoa` to do the Base64 encoding and then build the final URL-string.
…e API With recent changes, specifically PR 14515 *and* the previous patch, the `createObjectURL` helper function is now only used with the SVG back-end. All other call-sites, throughout the code-base, are now using `URL.createObjectURL(...)` directly and it no longer seems necessary to keep exposing the helper function in the API. Finally, the `createObjectURL` helper function is moved into the `src/display/svg.js` file to avoid unnecessarily duplicating this code on both the main- and worker-threads.
391651f
to
b87a243
Compare
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/18156cc1ae166ba/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/bfe7e3af341422f/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/18156cc1ae166ba/output.txt Total script time: 24.06 mins
Image differences available at: http://54.241.84.105:8877/18156cc1ae166ba/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/bfe7e3af341422f/output.txt Total script time: 25.47 mins
Image differences available at: http://54.193.163.58:8877/bfe7e3af341422f/reftest-analyzer.html#web=eq.log |
I don't really understand these Windows-only regressions, since testing in e.g. PR #14547 didn't fail. |
Looks good; thank you for improving this! |
Update two
display_utils
unit-tests to use native functionality rather than thecreateObjectURL
helper functionGiven that most of the code-base is already using native functionality, we can update these unit-tests similarily as well.
blob:
-URL test, we simply useURL.createObjectURL(...)
andBlob
directly instead.data:
-URL test, we simply usebtoa
to do the Base64 encoding and then build the final URL-string.[api-minor] Stop exposing the
createObjectURL
helper function in the APIWith recent changes, specifically PR [api-minor] Remove support for browsers/environments without fully working
URL.createObjectURL
implementations #14515 and the previous patch, thecreateObjectURL
helper function is now only used with the SVG back-end.All other call-sites, throughout the code-base, are now using
URL.createObjectURL(...)
directly and it no longer seems necessary to keep exposing the helper function in the API.Finally, the
createObjectURL
helper function is moved into thesrc/display/svg.js
file to avoid unnecessarily duplicating this code on both the main- and worker-threads.