Skip to content

[BUGFIX beta] Migrate autorun microtask queue to Promise.then#17618

Merged
rwjblue merged 1 commit intoemberjs:masterfrom
rwjblue:update-backburner
Feb 20, 2019
Merged

[BUGFIX beta] Migrate autorun microtask queue to Promise.then#17618
rwjblue merged 1 commit intoemberjs:masterfrom
rwjblue:update-backburner

Conversation

@rwjblue
Copy link
Copy Markdown
Member

@rwjblue rwjblue commented Feb 14, 2019

The primary change in backburner.js@2.5.0 is to use the Promise microtask queue primarily and falling back to MutationObserver when Promise is not present.

The test changes here are to migrate from window.onerror to window.onunhandledrejection hooks (due to moving the microtask delivery from MutationObserver to native Promise). The cross platform support for onunhandledrejection is a tad spotty (Chrome, Edge, and soon Firefox), so I had to guard in other browsers.

The primary change in Backburner.js is to use the Promise microtask
queue primarily and falling back to MutationObserver when Promise is not
present.

The test changes here are to migrate from `window.onerror` to
`window.onunhandledrejection` hooks (due to moving the microtask
delivery from `MutationObserver` to native `Promise`). The cross
platform support for `onunhandledrejection` is a tad spotty (Chrome,
Edge, and _soon_ Firefox), so I had to guard in other browsers.
@rwjblue rwjblue changed the title [BUGFIX beta] Update Backburner.js to 2.5.0. [BUGFIX beta] Migrate autorun microtask queue to Promise.then Feb 20, 2019
@rwjblue rwjblue merged commit 2d08b86 into emberjs:master Feb 20, 2019
@rwjblue rwjblue deleted the update-backburner branch February 20, 2019 19:57
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.

1 participant