Closed Bug 1488095 Opened Last year Closed 9 months ago

Lazy tab prematurely inserted when moved into another existing window

Categories

(WebExtensions :: Frontend, defect, P5)

defect

Tracking

(firefox67 verified)

VERIFIED FIXED
mozilla67
Tracking Status
firefox67 --- verified

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(2 files)

Run this code in an extension:

  (async function() {
    let url = "http://example.com/";
    let {id: tabId} = await browser.tabs.create({url, discarded: true});
    let {id: windowId} = await browser.windows.create();
    let [tab] = await browser.tabs.move(tabId, {windowId, index: -1});
    console.assert(tab.discarded, `Tab is still discarded`);
    await browser.windows.remove(windowId);
  })();

Result:

  [bug 1345098] Lazy browser prematurely inserted via 'messageManager' property access:
      getter@https://searchfox.org/mozilla-central/rev/c8483be/browser/base/content/tabbrowser.js#1989
      handleEvent@https://searchfox.org/mozilla-central/rev/c8483be/browser/components/extensions/parent/ext-browser.js#417
      addTab@https://searchfox.org/mozilla-central/rev/c8483be/browser/base/content/tabbrowser.js#2481
      addWebTab@https://searchfox.org/mozilla-central/rev/c8483be/browser/base/content/tabbrowser.js#2175
      adoptTab@https://searchfox.org/mozilla-central/rev/c8483be/browser/base/content/tabbrowser.js#3666
      move@https://searchfox.org/mozilla-central/rev/c8483be/browser/components/extensions/parent/ext-tabs.js#905
  Assertion failed: Tab is still discarded

Expected: the tab is not prematurely inserted, the assert passes.
Priority: -- → P5
Depends on: 1521346

Just a webext test to avoid regressions, actual fix is in bug 1521346.

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Keywords: checkin-needed

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23d99110fdbc
Test that webext tabs.move preserves tab laziness. r=mixedpuppy

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Verified in Win7x64, Ubuntu 14.0.4 x32, MacOS 10.14.1 on FF67.0b5 (20190325125126)

The problem is still reproducing.
I have created a test webextensions that runs the script from the comment 0 (see the attacmenet). After installing the webext and when the script is run the following error is displayed in the console:
this._box is null
Assertion failed: Tab is still discarded

Is this the optimal way to verify this issue? Should we try something else?

Flags: needinfo?(oriol-bugzilla)

Comment 0 had a typo, it was checking discared instead of discarded. Should work now.

Flags: needinfo?(oriol-bugzilla)

Thanks for the fast response! It works now.
Marking the bug as verified fixed.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.