If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Ignore exceptions thrown from nsIBrowserSearchInitObserver

RESOLVED FIXED in Firefox 35

Status

()

Firefox
Search
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

unspecified
Firefox 35
x86
Mac OS X
Points:
---
Bug Flags:
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8492432 [details] [diff] [review]
patch

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)

Updated

3 years ago
Assignee: nobody → dtownsend+bugmail
Is this the same as bug 1068437?
(Assignee)

Comment 2

3 years ago
Uhh yes!
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1068437
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+
(Assignee)

Updated

3 years ago
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Assignee)

Comment 4

3 years ago
Landed: https://hg.mozilla.org/integration/fx-team/rev/af6a5156818f
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1068437
https://hg.mozilla.org/mozilla-central/rev/af6a5156818f
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 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.