Closed Bug 1010289 Opened 11 years ago Closed 11 years ago

TEST-UNEXPECTED-FAIL | resource://app/modules/experiments/Experiments.jsm | A promise chain failed to handle a rejection: AlreadyShutdownError: uninit() already called

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch Fixing the issue (obsolete) — Splinter Review
This should also fix bug 1010291.
Assignee: nobody → dteller
Attachment #8422676 - Flags: review?(benjamin)
Comment on attachment 8422676 [details] [diff] [review] Fixing the issue It appears that the meat of this patch is: * the changes to AlreadyShutdownError * test_api.js Is that correct? Why are the changes to AlreadyShutdownError necessary? Is the rest just style fixup? If so why is the new style preferable?
* The changes to AlreadyShutdownError is necessary to get the correct stack. Otherwise, the stack obtained was pure noise. * The apparent style fixups are actually the meat of the bugfix, as they put the `catch` in the right place. Prior to the fix, the error handler only caught the errors that were raised before the call to .then() and was missing any error from the success handler. Rewriting them as Tasks makes the error more visible. * I am not 100% sure that the change in test_api.js is necessary, but there was also potential for an uncaught error.
Attachment #8422676 - Attachment is patch: true
Comment on attachment 8422676 [details] [diff] [review] Fixing the issue The extra Task is so ugly :-( Since shutdown exceptions are the only exceptions that are expected here, maybe just checking this._shutdown would make this cleaner and avoid the extra nested task/spawn/bind stuff. Other exceptions really should be turning the testsuite orange.
I for one find Task less error-prone. YMMV. If you prefer I can rewrite that patch with raw Promise instead of Task. By the way, my patch fixes 3 uncaught errors in the various tests of Experiments.jsm (errors 1, 2 and 3 of https://tbpl.mozilla.org/php/getParsedLog.php?id=39573107&tree=Try&full=1 ). Could you take a look at the errors and tell me if any of these should be real oranges?
This version doesn't introduce a new Task and is a bit finer-grained on the exceptions it catches.
Attachment #8422676 - Attachment is obsolete: true
Attachment #8422676 - Flags: review?(benjamin)
Attachment #8423040 - Flags: review?(benjamin)
`AddonManager is not initialized` is not an expected error.
Attachment #8423040 - Flags: review?(benjamin) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: