Closed Bug 1486757 Opened 6 years ago Closed 6 years ago

Fix broken check for waitForAnnotation in download's head.js

Categories

(Toolkit :: Downloads API, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I took a brief look at bug 1480267 for the possible reasons in the recent uplift.

I realised that in bug 1468980, I changed waitForAnnotation in the head.js file, to use the new places API.

What I forgot was that if the page hasn't been added to the database yet, then PlacesUtils.history.fetch will return null.

The result check I added in the waitForCondition, doesn't account for that, so sometimes we see things such as:

Unexpected exception Should have found annotation downloads/destinationFileURI for http://www.example.com:44227/interruptible.txt - threw exception: TypeError: pageInfo is null, can't access property "annotations" of it

I don't think this will fix all the intermittents of test_DownloadLegacy.js as there were some existing beforehand. However, it should help return to previous levels.
Comment on attachment 9004544 [details]
Bug 1486757 - Check that pageInfo is also valid in waitForAnnotation in downloads's head.js to avoid intermittents.

:Paolo Amadini has approved the revision.
Attachment #9004544 - Flags: review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bcf51e940502
Check that pageInfo is also valid in waitForAnnotation in downloads's head.js to avoid intermittents. r=paolo
https://hg.mozilla.org/mozilla-central/rev/bcf51e940502
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Blocks: 1306510
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: