-
Notifications
You must be signed in to change notification settings - Fork 949
fix: [Widget Image] Remove oldurl string check since it's always a string and prevent the ObjectURL cleaning resulting in a memory leak. #3171
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
Conversation
…ring and prevent the ObjectURL cleaning resulting in a memory leak.
Thanks! This check was added in 1b16391 (#1676) to distinguish between that src being an external url or an internal object url. However, it looks like step 2 of the revoking process checks to see if the url has scheme
I see that we have this same logic in the video and audio widgets. Can you fix it in those files too? |
FYI, on current firefox and chrome, |
Other places are at ipywidgets/packages/controls/src/widget_audio.ts Lines 65 to 67 in 1a12162
ipywidgets/packages/controls/src/widget_video.ts Lines 68 to 70 in 1a12162
|
…Widgets, since revokeObjectURL silently return on non-blob urls.
FYI i removed also the check on |
Reading the standard, we aren't guaranteed passing in undefined or null will always fail silently, just that a url that is not an object url will. In the standard, the first step is to parse the url, and the parsing standard seems to really want a string. Can you put back in the oldurl test so we're following the standard more closely? That will make it more certain it will work across browsers, at least ones that implement the spec as written. |
Thanks! |
See #3170