2010-05-27 67 views
0

当我使用的是Firefox(3.6.3),键入文本,各种文本框的页面,我得到以下错误:FireFox nsFormAutoComplete.js getBoolPref()存储的“设置”在哪里?

错误:[异常...“组件返回故障代码:0x8000ffff(NS_ERROR_UNEXPECTED)nsIPrefBranch。 getBoolPref]“nsresult:”0x8000ffff(NS_ERROR_UNEXPECTED)“location:”JS frame :: file:/// C:/Program%20Files/Mozilla%20Firefox/components/nsFormAutoComplete.js :: anonymous :: line 97“data:no ] 源文件:文件:/// C:/Program%20Files/Mozilla%20Firefox/components/nsFormAutoComplete.js 线:97

似乎发生,因为我已经开发了一个网页,以及即使输入文本进入Google搜索栏。

当我看着nsFormAutoComplete.js,我看到:

init : function() { 
    // Preferences. Add observer so we get notified of changes. 
    this._prefBranch = Cc["@mozilla.org/preferences-service;1"]. 
         getService(Ci.nsIPrefService).getBranch("browser.formfill."); 
    this._prefBranch.QueryInterface(Ci.nsIPrefBranch2); 
    this._prefBranch.addObserver("", this.observer, false); 
    this.observer._self = this; 

    this._debug = this._prefBranch.getBoolPref("debug"); 
    this._enabled = this._prefBranch.getBoolPref("enable"); 
    this._agedWeight = this._prefBranch.getIntPref("agedWeight"); 
    this._bucketSize = this._prefBranch.getIntPref("bucketSize"); 
    this._maxTimeGroupings = this._prefBranch.getIntPref("maxTimeGroupings"); 
    this._timeGroupingSize = this._prefBranch.getIntPref("timeGroupingSize") * 1000 * 1000; 
    this._expireDays = this._getFormExpiryDays(); 

    this._dbStmts = []; 

    this._observerService.addObserver(this.observer, "xpcom-shutdown", false); 
}, 

的问题出现在这条线正在发生:

this._debug = this._prefBranch.getBoolPref("debug"); 

现在,我最好的猜测是,偏好“调试”并不存在于FireFox读取其偏好的地方。

我对FireFox并不了解,搜索网络并没有得到太多的信息。

问题:FireFox在哪里存储/检索这些首选项?

我想,如果我把“调试”的优先选择放在这个位置,我应该消除错误。不过,我接受其他建议/更多信息。

谢谢! ---丹---

回答

-1

好的。我想到了。也许这会帮助别人。在nsFormAutoComplete.js中,有一个首选项列表。

prefs.js文件是关键,它位于C:\ Documents and Settings \\ application data \ firefox \ profiles \\ prefs.js中。

你不想直接编辑这个文件。相反,在FireFox的地址栏中输入about:config并按照这种方式添加首选项。偏好如下:

browser.formfill。并键入。

所以对于调试的人来说,它是browswer.formfill.debug作为布尔值。我将它设置为false。之后,它在下一个偏好是.agedWeight时失败了。

在添加了nsFormAutoComplete.js中的所有首选项之后,我发现错误消失了。

相关问题