在GreaseMokey里又一段代码,是GreaseMokey的开发者发现了一个firefox的bug,然后写在注释里,firefox的开发者看到了这段话,于是在下面给出了解决方案,并且回复了。
// This is the most amazing thing I have ever seen.
// Multiple statements in the JavaScript interpreter were causing a crash
// in FF 1.0.x.
// I described it to Brendan, and, after a bit of thought, he knew right off
// the top of his head that adding a pointless eval() would fix it. Magic.
eval("42");
var sandbox = new this.sandboxCtor();
var storage = new GM_ScriptStorage(script);
var logger = new GM_ScriptLogger(script);
var xmlhttpRequester = new GM_xmlhttpRequester(this.unsafeContentWin,
this.chromeWindow);
//在firefox1.0.X中,当又多个表达式的时候会导致firefox崩溃
//你只要在里面添加以个eval()行了
GreaseMokey开发者发现Firefox 1.0.x中JavaScript解释器存在多语句导致崩溃的问题,并在注释中说明。Firefox开发者看到后给出解决方案,即在代码里添加一个eval()可解决该崩溃问题。
1657

被折叠的 条评论
为什么被折叠?



