paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 387 forks source link

Console errors in chrome Version 49.0.2607.0 canary (64-bit) #393

Closed chrisjohnson closed 8 years ago

chrisjohnson commented 8 years ago

So I started off with v0.32.2 bundled into my application, but as of recently I'm seeing an error about RegExp.prototype.global: https://i.imgur.com/G8lDx6b.png

So I figured things have changed, shim is out of date. Side question: is there a way I can get a CDN link for the "latest" es6-shim that updates as browsers update?

Anyway I switch to cdnjs link and in the process update to v0.34. Now I see a different error: https://i.imgur.com/4Xfb8Kv.png

As soon as I remove the shim, in both cases, the error goes away, so I'm fairly certain it's the shim itself. Any suggestions? I'm not sure if it's actually breaking anything but I do notice it. I have tried with and without es5-shim to be safe

ljharb commented 8 years ago

It's not generally a great idea to blindly update to the latest of anything, but the cdnjs link should work.

Is this only happening in Chrome Canary, or is it happening in stable Chrome?

chrisjohnson commented 8 years ago

I don't have any power to impact "blind updates" as it's a change in the browser that's introduced this (this error was not showing up before and I haven't changed the code in months). So given that it's blind vs blind I would rather es6-shim be blindly updated to match the browser than have the browser blindly update and my version of the shim be behind. Seems the lesser of two evils to me

The cdnjs link has a version in it which is why I was asking if there's some sort of "stable" permalink version or url for cdnjs that I don't know about.

It doesn't seem to happen in chrome stable. So perhaps it's something that chrome will need to fix on its side. In either case worth noting

ljharb commented 8 years ago

Thanks. I do keep an eye on Chrome Canary and will likely release a new version soon that handles this - as master works fine in the latest Canary.

rolandjitsu commented 8 years ago

I also got the same error after I updated. The one with the native promise thing.

ljharb commented 8 years ago

I handled the Promise uncaught rejection in #403, and the RegExp issue has been fixed in Canary itself.

Please let me know if any other console errors pop up - I consider it perfectly acceptable for errors to happen in nightly/canary builds, but they are still useful signals to prevent those errors from happening in a stable build.