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

Why polyfill is used when native is supported? (Promise) #191

Closed
wintercounter opened this issue Apr 13, 2016 · 2 comments
Closed

Why polyfill is used when native is supported? (Promise) #191

wintercounter opened this issue Apr 13, 2016 · 2 comments
Labels

Comments

@wintercounter
Copy link

I'm using babel-polyfill. I always have such stack trace:

(anonymous function)            @   es6.promise.js:119
perform                                 @   es6.promise.js:61
(anonymous function)            @   es6.promise.js:113
module.exports                  @   _invoke.js:5
queue.(anonymous function)  @   _task.js:31
run                                         @   _task.js:19
listener                                    @   _task.js:23

The question is simple. Why? Chrome has support for native Promises (this is a Chrome stack trace).

@zloirock
Copy link
Owner

Almost all current Promise implementations have many bugs and most of them can't be fixed without completely replacement Promise constructor, you can find many V8 bugs in this tracker. Current feature detection for Promise includes support @@species pattern (the ultimate feature detection for almost all Promise bugs, support @@species should be added in V8 ~ Chrome 51) and unhandled rejection tracking (added in V8 ~ Chrome 49), so native Promise will be used instead of polyfill only in V8 ~ Chrome 51.

@wintercounter
Copy link
Author

Thanks for the answer.

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

No branches or pull requests

2 participants