-
Notifications
You must be signed in to change notification settings - Fork 43
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
for(const x in y) #541
Comments
In |
so these changes "hackfixes"
and now complaining async/await keyword. |
This isn't worth it, might regress other code, and doesn't fix enough to get Github working properly. Wontfixing for TenFourFox. |
If we can get async functions working, we might reexamine this hack. |
This may also fix Discord, see https://tenfourfox.tenderapp.com/discussions/problems/8804-discord-problem |
This enables login to Discord, but now it just "crashes" (the page complains Discord has crashed). Changing the user agent makes no difference. |
There are various failures, but they aren't unexpected: /Volumes/BruceDeuce/src/tenfourfox/js/src/jit-test/tests/parser/letContextualKeyword.js:7:5 Error: Assertion failed: got false, expected true ecma_6/LexicalEnvironment/const-declaration-in-for-loop.js: rc = 3, run time = 0.7233381146644: Don't crash compiling a non-body-level for-loop whose loop declaration is a const ecma_6/LexicalEnvironment/const-declaration-in-for-loop.js: rc = 3, run time = 1.3335421146644: Don't crash compiling a non-body-level for-loop whose loop declaration is a const js1_8_5/reflect-parse/for-loop-destructuring.js: rc = 3, run time = 1.013104assertError@js1_8_5/reflect-parse/PatternAsserts.js:92:11 js1_8_5/reflect-parse/PatternAsserts.js:92:11 Error: expected SyntaxError for "for (const x in foo);" js1_8_5/reflect-parse/for-loop-destructuring.js: rc = 3, run time = 5.893012assertError@js1_8_5/reflect-parse/PatternAsserts.js:92:11 js1_8_5/reflect-parse/PatternAsserts.js:92:11 Error: expected SyntaxError for "for (const x in foo);" |
No offense, but I don't make one-offs since we don't have continuous integration and builds are lengthy (and they're too large to attach here anyway). The patch above is essentially what's on tree, so you could do it off the FPR14 tag with that added. |
Since the latest attempt at #521 ended in failure again, and this might add some partial functionality on some sites, we'll try it (with test fixes) for FPR15. |
Leaving open while I ponder if more work is needed. |
This is now causing github to go into infinite errors, essentially seizing the browser (primarily on issues) due to an uncaught check op. I removed this op as a temporary measure but this makes the hack even more disgusting since |
maybe create a pref to change behavior in runtime? |
Maybe, except the check op is generated in the frontend bytecode emitter, so a previously compiled script wouldn't change its behaviour. (Conversely, it would be highly impractical (and slow) to actually make the check during execution depend on a runtime setting, so this would have to live in the frontend if I did it at all.) |
This is needed for full functionality in Github's current release, and probably fixes other sites. Unfortunately it also seems to have been fixed by the frontend binding rewrite that is the crux of #533.
It may be possible to hack in something that allows
const
as a synonym forvar
as a temporary fix. The underlying issues, which were never fully repaired, are https://bugzilla.mozilla.org/show_bug.cgi?id=449811 and https://bugzilla.mozilla.org/show_bug.cgi?id=1101653 .The text was updated successfully, but these errors were encountered: