Closed Bug 1222087 Opened 4 years ago Closed 4 years ago

Ignore Cr.NS_ERROR_NO_INTERFACE exceptions in QueryInterface/getInterface methods

Categories

(DevTools :: Debugger, defect)

defect
Not set

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: kmag, Assigned: kmag)

Details

Attachments

(2 files)

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.
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)
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
https://hg.mozilla.org/mozilla-central/rev/a8dd21de7df7
https://hg.mozilla.org/mozilla-central/rev/c96b93b4d7c0
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.