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

Firefox bug: Workers are destroyed before function is completed #36

Open
gingerchew opened this issue Oct 20, 2020 · 1 comment · May be fixed by #38
Open

Firefox bug: Workers are destroyed before function is completed #36

gingerchew opened this issue Oct 20, 2020 · 1 comment · May be fixed by #38
Labels
bug Something isn't working

Comments

@gingerchew
Copy link
Member

gingerchew commented Oct 20, 2020

Workers are destroyed before function is completed

Possible solution:

Assign the worker variable to form element like so

form.__worker = createWorker();

This way there is a reference to the worker in a more global space?

Possible Issues

Needs to be tested to see if the issue is that it's not a GLOBAL variable or if it just needs a DOM reference

@gingerchew gingerchew added the bug Something isn't working label Oct 20, 2020
@gingerchew gingerchew linked a pull request Oct 21, 2020 that will close this issue
@gingerchew
Copy link
Member Author

This has been addressed in PR #38 but it hasn't been tested. While the bug references an "Active reference", the attachment to the form variable/object might not be enough. Then we would have to try other options.

Surma and Jake Archibald mentioned in a video somewhere simply messaging the worker every so often to keep the reference from being GC'd. While this is a possibility, I'd prefer not having a timer set up if it can be avoided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant