Closed Bug 1775638 Opened 2 years ago Closed 1 year ago

Intermittent browser/base/content/test/tabs/browser_adoptTab_failure.js | single tracking bug

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: jmaher, Assigned: Oriol)

References

Details

(Keywords: intermittent-failure, intermittent-testcase)

Attachments

(1 file)

No description provided.

Additional information about this bug failures and frequency patterns can be found by running: ./mach test-info failure-report --bug 1775638

I see this error in the logs:

INFO - Console message: [JavaScript Error: "can't access property "ownerDocument", aBrowser.parentElement is null" {file: "resource://gre/modules/PageThumbs.jsm" line: 356}]
INFO - _captureRemoteThumbnail@resource://gre/modules/PageThumbs.jsm:356:15

The 2nd subtest (test_on_drop) probably triggers gBrowser.tabContainer.startTabDrag, which calls PageThumbs.captureToCanvas.
This ends up in PageThumbs._captureRemoteThumbnail, which has this code:

if (!aBrowser.browsingContext || !aBrowser.parentElement) {
  return null;
}
/* ... */
let contentInfo = await thumbnailsActor.sendQuery(/* ... */);
/* ... */
let doc = aBrowser.parentElement.ownerDocument;

I guess aBrowser.parentElement can become null during the await.

And somehow, this makes the next subtest timeout, I guess addTab() or BrowserTestUtils.openNewBrowserWindow() fail to resolve.

_captureRemoteThumbnail was already checking that the provided browser
hadn't been removed at the beginning, but due to using "await" this
could also happen in the middle, causing an exception.

That was the reason for flakyness in browser_adoptTab_failure.js

This patch adds extra checks, and replaces "aBrowser.parentNode" with
the more meaningful "aBrowser.mInitialized" like in D14911.

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Pushed by oriol-bugzilla@hotmail.com:
https://hg.mozilla.org/integration/autoland/rev/2b00b517fee0
Fix flaky browser_adoptTab_failure.js. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
See Also: → 1863351
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: