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

Add fallback for unhandled rejection timer on Firefox. #1627

Closed
wants to merge 2 commits into from
Closed

Add fallback for unhandled rejection timer on Firefox. #1627

wants to merge 2 commits into from

Conversation

binki
Copy link

@binki binki commented Nov 27, 2019

The default unhandled rejection timer is a setTimeout() from a removed
iframe. On Firefox, this throws NS_ERROR_NOT_INITIALIZED. This code
adds a test to verify that the setTimeout gleaned from the iframe is
functional and falls back to the global function if it isn’t.

This fixes support for rejecting promises on Firefox.

Fixes #1623.

The default unhandled rejection timer is a setTimeout() from a removed
iframe. On Firefox, this throws NS_ERROR_NOT_INITIALIZED. This code
adds a test to verify that the setTimeout gleaned from the iframe is
functional and falls back to the global function if it isn’t.

This fixes support for rejecting promises on Firefox.

Fixes #1623.
@binki
Copy link
Author

binki commented Nov 27, 2019

Playground at https://jsfiddle.net/m86xou54/ , see behavior in e.g. Firefox-71.0b12 which reproduces the issue.

The default unhandled rejection timer is a setTimeout() from a removed
iframe. On Edge/IE, this can sometimes result in the error “Can't
execute code from a freed script”.

This restores support for IE/Edge.

Fixes #1620.
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

Successfully merging this pull request may close these issues.

Unhandled rejection check causes errors in Firefox
1 participant