Closed Bug 1488094 Opened Last year Closed 8 months ago

Discarded tab becomes blank when moved into a new window

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 629232

People

(Reporter: Oriol, Unassigned)

References

(Blocks 1 open bug)

Details

Run this code in an extension with the "tabs" permission:

  (async function() {
    let url = "http://example.com/";
    let {id: tabId} = await browser.tabs.create({url, discarded: true});
    await browser.windows.create({tabId});
    let tab = await browser.tabs.get(tabId);
    console.assert(tab.url === url, `Tab url, expected "${url}", got "${tab.url}"`);
    await browser.tabs.remove(tabId);
  })();

Result:
  Assertion failed: Tab url, expected "http://example.com/", got "about:blank"

Expected: the assert passes
Summary: Discarded tab state becomes blank when moved into a new window → Discarded tab becomes blank when moved into a new window
Component: Frontend → Tabbed Browser
Product: WebExtensions → Firefox
Blocks: lazytabs
Priority: -- → P3
No longer blocks: lazytabs

In fact this was the same as bug 629232.

This code was producing a blank tab but has already been fixed:

  (async function() {
    let url = "http://example.com/";
    let {id: tabId} = await browser.tabs.create({url, discarded: true});
    await browser.windows.create({tabId});
  })();

The assert that I used in comment 0 still fails, but this seems bug 1416087.

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 629232
You need to log in before you can comment on or make changes to this bug.