Closed Bug 1070223 Opened 12 years ago Closed 12 years ago

Ignore exceptions thrown from nsIBrowserSearchInitObserver

Categories

(Firefox :: Search, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 35

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file)

Attached patch patch — — Splinter Review
The observer could throw an exception, in particular in testing urlbarBindings sometimes does this if windows or tabs are closed before the service initialises. This is causing the jetpack tests to show errors about uncaught promise rejections. So this just wraps in a try...catch.
Attachment #8492432 - Flags: review?(MattN+bmo)
Assignee: nobody → dtownsend+bugmail
Is this the same as bug 1068437?
Uhh yes!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8492432 [details] [diff] [review] patch Review of attachment 8492432 [details] [diff] [review]: ----------------------------------------------------------------- It seems like this won't hurt. I would definitely run the various search tests to make sure this behaviour isn't tested and expecting an exception/rejection. ::: toolkit/components/search/nsSearchService.js @@ +3873,5 @@ > function onSuccess() { > + try { > + observer.onInitComplete(self._initRV); > + } > + catch (e) { Nit: Cuddle the catch @@ +3874,5 @@ > + try { > + observer.onInitComplete(self._initRV); > + } > + catch (e) { > + Components.utils.reportError(e); Nit: Cu is already defined so you can use: Cu.reportError(e); I'm not sure why the one below isn't using Cu
Attachment #8492432 - Flags: review?(MattN+bmo) → review+
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: