Closed Bug 827134 Opened 12 years ago Closed 5 months ago

Some XPCOMs haven't queried interfaces which their needs

Categories

(Toolkit :: Autocomplete, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: tetsuharu, Unassigned)

References

(Blocks 1 open bug)

Details

[Environment]
* http://hg.mozilla.org/mozilla-central/rev/20d1a5916ef6

[STR]
1. Start "Browser Debugger" & set "Pause on exceptions"
2. Use Firefox

[Result]
Browser Debugger pauses Firefox many times with the error "2147500034".
Their stack trace will show http://hg.mozilla.org/mozilla-central/file/c4abfca219e5/js/xpconnect/loader/XPCOMUtils.jsm#l332.

For example, stack trace:
XPCOMUtils_QueryInterface: XPCOMUtils.jsm:332
attachController: autocomplete.xml:344
onxblfocus:autocomplete.xml:583
I suspect this comes from

>346       <method name="attachController">
>347         <body><![CDATA[
>348           this.mController.input = this;

where this isn't QIing successfully to nsIAutoCompleteInput. Not sure why, however.
Component: XPCOM → General
Product: Core → Firefox
Other example:
[STR]
Open passward manager.

[Stack trace]
XPCOMUtils_QueryInterface: XPCOMUtils.jsm:332
Startup:passwordManagerCommon.js:30
onload: passwordManager.xul:1


I have not specified other STR yet, however, at least, many XPCOMs might not handle their QI correctly.
I suspect the exception in comment 2 originates from nsLoginManager's init method: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/nsLoginManager.js#91.
I find other reproduce codes in comment 2:

(function(){
  let origin = Service.io.newURI(document.documentURI, null, null).prePath;
  let matchData = Cc["@mozilla.org/hash-property-bag;1"]
                            .createInstance(Ci.nsIWritablePropertyBag);
  matchData.setProperty("hostname", origin);
  let savedLogins = Services.logins.searchLogins({}, matchData);
])();

The exception relating nsLoginManager will be happened when we call nsILoginManager's method.
Component: General → Autocomplete
Product: Firefox → Toolkit
Blocks: 827177
I filed Bug 827177 to fix same bug of nsLoginManager.
Blocks: 895548
Priority: -- → P5
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.