Firefox控制台错误:试图在清除的范围内运行编译并执行脚本

Firefox console Error: attempt to run compile-and-go script on a cleared scope

本文关键字:运行 范围内 编译 脚本 执行 清除 错误 控制台 Firefox      更新时间:2023-09-26

我的Firefox错误控制台中出现了以下错误。每次刷新页面时,它都会显示很多次。

错误:试图在已清除的作用域上运行编译并执行脚本源文件:chrome://firebug/content/net/httpActivityObserver.js线路:136

这似乎出现在每个选项卡上,即使我从页面中删除了所有代码,这种情况仍然会发生。因此,我认为这是一个firefox错误,而不是我自己代码中的某个错误。因此,我无法调试自己的脚本。

非常感谢您的帮助。

这似乎是Firefox的问题。

我在下面写的代码在Chrome中运行得很好,但在Firefox(12)中根本不起作用;与问题中描述的错误相同。

注意:我没有安装Firebug。我使用了Tools/WebDeveloper中的控制台。

<html>
<head>
<script>
    window.onload = function() {
        document.write("CORS test");
        function createCORSRequest(method, url){
            var xhr = new XMLHttpRequest();
            if ("withCredentials" in xhr){
                xhr.open(method, url, true);
            } else if (typeof XDomainRequest != "undefined"){
                xhr = new XDomainRequest();
                xhr.open(method, url);
            } else {
                xhr = null;
            }
            return xhr;
        }
        var request = createCORSRequest("GET", "http://a.localhost:25565/");
        function doneLoading(rq)
        {
            document.write(rq.responseText);
        }
        if (request){
            document.write("<br />Requested..<br /><br />");
            console.log(request);
            request.onload = function() { doneLoading(request) } 
// THE ERROR POINTS TO THE ABOVE LINE
            request.send();
        }
        else {
            document.write("<br />No request!");
        }
    }
</script>
</head>
<body>
</body>
</html>

该问题被列为firebug问题。http://code.google.com/p/fbug/issues/detail?id=4690

在使用Firefox 12(OS X 10.6.8)时,只需简单地退出并重新启动浏览器即可http://cl.ly/3P3E2U1p050s351i3C2W,重新启动后,所有错误都消失了。