-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bringing back support for Firefox (and other non-V8 browsers) #896
Conversation
This exported 'undefined' if the user agent/version didn't match, and for some reason beyond my understanding that value became {default:undefined} on import. While you can compare a literal object to a number, you cannot compare this special {default:undefined} object to a number, as you'd get a TypeError complaining about it. As more and more modules have been comparing known version numbers to the V8 version in order to prevent V8 deoptimization lately, these have started failing in Firefox (at least). All code I could find using this version number compares it in a way where '0' will be correctly evaluated as 'not one of those recent v8 versions we're guarding against', so it should work fine.
I don't see how it could be related to #764. I dropped |
Sadly, your changes does not seem to fix the issue. I added a simple reproduction repo for your convenience in olemartinorg/core-js-firefox-bug. Please note, I recently also found out the code fails in Safari as well as Firefox. I assume all non-chromium browsers will have this code crashing on load. In Firefox, i get a Let me know if my reproduction example does not crash on load for you. I really appreciate |
@olemartinorg the fix still is not published on NPM. |
Moreover, |
I know it's not published to NPM. I tried doing a As for #764, the problem description there is still unclear to me, but the fact is still that this |
#764 is about the hanging of the browser, your issue - about crashing in another place. As I could see: // engine-v8-version:
module.exports = version && +version; // -> undefined or integer
// es.array.concat
var V8_VERSION = require('../internals/engine-v8-version');
// ...
// The error in this line: `Uncaught TypeError: can't convert V8_VERSION$1 to number`
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || somethingElse(); In your bundle That meansn that the error in your bundling process - seems |
The bug in this function __interopImport$D(ex) {
if (ex.__esModule) {
return ex;
}
if (ex.default !== undefined) {
return ex.default;
}
return ex;
} |
Oh, wow, thanks! I'm still a bit green when it comes to this whole JS ecosystem. I'll take this up with the EDIT: The issue is specific to |
which could cause hanging FF11-21 and some versions of old WebKit I don't see any possible workaround closes zloirock#764, zloirock#896, zloirock#911
This exported 'undefined' if the user agent/version didn't match, and for some reason beyond my understanding that value became
{default:undefined}
on import. While you can compare a literal object to a number, you cannot compare this special{default:undefined}
object to a number, as you'd get aTypeError
complaining about it. As more and more modules have been comparing known version numbers to the V8 version in order to prevent V8 deoptimization lately, these have started failing in Firefox (at least). All code I could find using this version number compares it in a way where '0' will be correctly evaluated as 'not one of those recent v8 versions we're guarding against', so it should work fine.This might fix #764, but that issue has been fairly light on specific details, so maybe only time will tell if this fixes it. As described in that issue, I have been able to reproduce my specific issue as far back as 3.3.5.