Firefox JavaScript JIT可以从脚本中禁用吗? [英] Can the Firefox JavaScript JIT be disabled from a script?

查看:120
本文介绍了Firefox JavaScript JIT可以从脚本中禁用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的网站有一个相当复杂的JS应用程序,最新的Firefox 10发布失败。这是由于在JS解释器中看起来是一个错误,当变量显然不是时,变量会返回NULL。只有JIT编译器处于活动状态时才会出现此错误,而不是禁用时。我们会将这个bug报告给Mozilla,并尝试寻找解决方法。

是否有一种方法可以在脚本中禁用Firefox中的特定脚本的JIT?

谢谢。

解决方案

答案来自于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 a with({}) {} 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!

这篇关于Firefox JavaScript JIT可以从脚本中禁用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆