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

setImediate callback not called #464

Closed
pepone opened this issue Dec 12, 2018 · 9 comments
Closed

setImediate callback not called #464

pepone opened this issue Dec 12, 2018 · 9 comments

Comments

@pepone
Copy link

pepone commented Dec 12, 2018

we are using the core-js setImediate included by babel-polyfill we are observing that with safari some times but not always the callback pass to setImediate is not dispatched

We are observing this in a large application and have non been able to track it down to a more simple test case, we added a workaround to use setTiemout with safari workers, and it solves our issue, but will be nice to track this down.

https://github.com/zeroc-ice/ice/blob/f44f04e79537e45ba28f61317d7233ee19f05313/js/src/Ice/browser/TimerUtil.js#L64-L71

@JakeChampion
Copy link
Contributor

Have you tried replicating the issue by having a worker which only contains core-js and setImmediate?

@zloirock
Copy link
Owner

What's the version of Safari?

@zloirock
Copy link
Owner

I remember the same problem for microtasks in Safari, but not for tasks.

@pepone
Copy link
Author

pepone commented Dec 12, 2018

@zloirock that is with Safari 12.0.1 build 14606.2.104.1.1
@JakeChampion I didn't try

@pepone
Copy link
Author

pepone commented Dec 12, 2018

So far I have been testing an alternate implementation based on MessageChannel and works fine with the same Safari version

https://github.com/zeroc-ice/ice/blob/145d53a7cdb489a95178d7e6be95d98f16596e75/js/src/Ice/browser/TimerUtil.js#L89

@zloirock
Copy link
Owner

@pepone core-js should use the same in Safari.

@zloirock
Copy link
Owner

Maybe you also implicitly use another setImmediate polyfill which overrides core-js implementation?

@pepone
Copy link
Author

pepone commented Dec 12, 2018

core-js should use the same in Safari.

Yes I know, I looked at the implementation before and didn't see anything wrong there, we are observing the callback is not called with Safari but not always

Maybe you also implicitly use another setImmediate polyfill which overrides core-js implementation?

I don't think so, I will try to create a test with only the core-js implementation, we are getting this from babel polyfill that as far as I know uses core-js

@zloirock
Copy link
Owner

Closed as can't reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants