更新时间:2023-12-05 11:53:40
答案来自于mozilla.org的Brian Hackett(:bhackett)
lockquote
在脚本中使用 和
会禁用JIT的脚本,例如在顶部添加 ({}){}
。
在此处查看 https://bugzilla.mozilla.org/show_bug.cgi?id=730004#c11
好消息。这确实可以解决这个问题。
谢谢大家! Mozilla的岩石!
Our web site has a fairly complex JS app that fails with the latest Firefox 10 release. This is due to what appears to be a bug in the JS interpretor, making variables return NULL when they clearly aren't. This bug only occurs when the JIT compiler is active, not when it's disabled. We will report the bug to Mozilla and try to find a workaround.
Is there a way to disable the JIT in Firefox for a specific script, from inside the script?
Thank you.
The answer comes from Brian Hackett (:bhackett) at mozilla.org:
Using
with
in a script will disable the JIT for that script, e.g. adding awith({}) {}
to the top.
See it here https://bugzilla.mozilla.org/show_bug.cgi?id=730004#c11
Great news. This does indeed work around the issue.
Thanks everyone! Mozilla rocks!