Ignore Cr.NS_ERROR_NO_INTERFACE exceptions in QueryInterface/getInterface methods

RESOLVED FIXED in Firefox 47

Status

()

Firefox
Developer Tools: Debugger
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

unspecified
Firefox 47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

As discussed on IRC, the sheer number of these exceptions raised during normal use makes pausing on exceptions in chrome code impractical, so they probably deserve a special case.

We should probably only ignore these exceptions when the parent stack frame is native, and Components.Exception instances with `result=NS_ERROR_NO_INTERFACE` should probably be treated the same as the raw number.

I'm going to look into fixing this myself, but given that black boxing the sources that throw the exception didn't solve my problem, it may not be as simple a fix as I'm hoping.

Comment 1

2 years ago
Did you ever write a patch for this?
Flags: needinfo?(kmaglione+bmo)
I started on it, but got sidetracked. I'll look at it again this week.
Flags: needinfo?(kmaglione+bmo)
Created attachment 8722167 [details]
MozReview Request: Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen

Review commit: https://reviewboard.mozilla.org/r/35891/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/35891/
Attachment #8722167 - Flags: review?(nfitzgerald)
Created attachment 8722168 [details]
MozReview Request: Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r?fitzgen

Review commit: https://reviewboard.mozilla.org/r/35893/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/35893/
Attachment #8722168 - Flags: review?(nfitzgerald)
I'll add tests if the changes look reasonable.
Comment on attachment 8722168 [details]
MozReview Request: Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r?fitzgen

https://reviewboard.mozilla.org/r/35893/#review32545

These changes LGTM, lets get some tests! :)
Attachment #8722168 - Flags: review?(nfitzgerald) → review+
Comment on attachment 8722167 [details]
MozReview Request: Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen

https://reviewboard.mozilla.org/r/35891/#review32547
Attachment #8722167 - Flags: review?(nfitzgerald) → review+
Comment on attachment 8722167 [details]
MozReview Request: Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/35891/diff/1-2/
Comment on attachment 8722168 [details]
MozReview Request: Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r?fitzgen

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/35893/diff/1-2/
This turned out to be much easier to test than I expected.

I had to remove the check for Components.Exception instances, since it caused crashes (and I'm pretty sure it was wrong anyway). There are hardly places in the tree that throw Exception instances rather than the raw result ID, anyway.
Attachment #8722168 - Flags: review+ → review?(nfitzgerald)
Attachment #8722167 - Flags: review+ → review?(nfitzgerald)
Comment on attachment 8722168 [details]
MozReview Request: Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r?fitzgen

https://reviewboard.mozilla.org/r/35893/#review32567

Thanks!
Attachment #8722168 - Flags: review?(nfitzgerald) → review+
Comment on attachment 8722167 [details]
MozReview Request: Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen

https://reviewboard.mozilla.org/r/35891/#review32785
Attachment #8722167 - Flags: review?(nfitzgerald) → review+
https://hg.mozilla.org/integration/fx-team/rev/a8dd21de7df752056c99883ecd1e4cd19f65e82c
Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r=fitzgen

https://hg.mozilla.org/integration/fx-team/rev/c96b93b4d7c0d16b3ae95c4fff365df9d3564adc
Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r=fitzgen

Comment 14

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a8dd21de7df7
https://hg.mozilla.org/mozilla-central/rev/c96b93b4d7c0
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
You need to log in before you can comment on or make changes to this bug.