Remove the src
attribute from Image
objects used with natively supported JPEG images, when pages are cleaned-up/destroyed
This will further help reduce the amount of image data that's currently being held alive, by explicitly removing the `src` attribute. Please note that this is mostly relevant for browsers which do not support `URL.createObjectURL`, or where `disableCreateObjectURL` was manually set by the user, since `blob:` URLs will be revoked (see the previous patch). However, using `about:memory` (in Firefox) it does seem that this may also be generally helpful, given that calling `URL.revokeObjectURL` won't invalidate the image data itself (as far as I can tell).
This commit is contained in:
parent
983b25f863
commit
88d5750030
@ -488,6 +488,7 @@ function releaseImageResources(img) {
|
||||
URL.revokeObjectURL) {
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
img.removeAttribute('src');
|
||||
}
|
||||
|
||||
export {
|
||||
|
Loading…
Reference in New Issue
Block a user