Skip to content
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

in V2 Chrome extension, need to call revokeObjectURL? #38

Open
neogeographica opened this issue Aug 4, 2023 · 1 comment
Open

in V2 Chrome extension, need to call revokeObjectURL? #38

neogeographica opened this issue Aug 4, 2023 · 1 comment

Comments

@neogeographica
Copy link
Owner

The old V2 extension (and perhaps the Firefox extension if I base that on V2) uses createObjectURL to download the blob. I'm not sure when/if the created URL (and therefore its referenced blob) will get garbage collected; documentation says "when the document is unloaded" but I'm not sure what that is in the case of this extension's background.js script.

I could explicitly call revokeObjectURL if needed, although not until I'm sure that it's unused/unreferenced. I guess that would be in the handleDownloadChanged callback in the same spot as clearing status and re-enabling the context menu.

It may be that the current garbage collecting behavior is fine though. Need to check.

@neogeographica
Copy link
Owner Author

Probably fine with non-persistent page.

If the page needed to be persistent, we could call revokeObjectURL when the handleDownloadChanged handler detects that the download is complete.

@neogeographica neogeographica changed the title in V2 extension, need to call revokeObjectURL? in V2 Chrome extension, need to call revokeObjectURL? Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant