Closed Bug 1521346 Opened 2 years ago Closed 2 years ago

Lazy tab prematurely inserted when moved into another window

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

(Depends on 1 open bug, Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

  1. Let a window have 4 tabs, activate the 1st one.

  2. Enable session restore, restart Firefox, focus that window.

  3. Press Shift and click the 3rd tab so that tabs 1,2,3 are multiselected with the 1st active.

  4. Open browser console and check that the 3rd tab is lazy:

    gBrowser.tabs[2].linkedPanel === ""
    
  5. Right-click a multiselected tab, chose "Move Tabs > Move to New Window"

  6. Close browser console, focus the new window, open browser console and enter

    gBrowser.tabs[2].linkedPanel === ""
    
  7. It should still be true but now it's false. The tab is no longer lazy.

TODO: the first lazy tab is not moved using gBrowser.adoptTab, so it's still unlazified.

Priority: -- → P3
See Also: → 1521923

Yes. The first tab is moved using window.openDialog instead of gBrowser.adoptTab, so it's still unlazified. openDialog is an native method and I don't have much idea about how to fix it, should be done in another bug.

Keywords: checkin-needed

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e0ff6bf01a9f
Preserve lazyness when moving tabs into a new window. r=jaws

Keywords: checkin-needed

Backed out changeset e0ff6bf01a9f (Bug 1521346) for TV and bc failure in browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js

https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&revision=e0ff6bf01a9f82c228a6890026d78c34a1bc95d9

https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=223453314

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=223453314&repo=autoland&lineNumber=2816

21:06:56 INFO - Buffered messages logged at 21:05:29
21:06:56 INFO - Console message: OpenGL compositor Initialized Succesfully.
21:06:56 INFO - Version: 2.1 INTEL-10.6.33
21:06:56 INFO - Vendor: Intel Inc.
21:06:56 INFO - Renderer: Intel Iris OpenGL Engine
21:06:56 INFO - FBO Texture Target: TEXTURE_2D
21:06:56 INFO - TEST-PASS | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Zero multiselected tabs -
21:06:56 INFO - TEST-PASS | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Two tabs now in the old window -
21:06:56 INFO - TEST-PASS | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Three tabs in the new window -
21:06:56 INFO - TEST-PASS | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Previously active tab is still the active tab in the new window -
21:06:56 INFO - Leaving test bound test
21:06:56 INFO - Entering test bound testLazyTabs
21:06:56 INFO - Buffered messages finished
21:06:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Test timed out -
21:06:56 INFO - GECKO(2001) | MEMORY STAT | vsize 4492MB | residentFast 451MB | heapAllocated 68MB
21:06:56 INFO - TEST-OK | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | took 90027ms
21:06:56 INFO - Not taking screenshot here: see the one that was previously logged
21:06:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Found a tab after previous test timed out: http://example.com/?3 -
21:06:56 INFO - Not taking screenshot here: see the one that was previously logged
21:06:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Found a tab after previous test timed out: http://example.com/?2 -
21:06:56 INFO - Not taking screenshot here: see the one that was previously logged
21:06:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Found a tab after previous test timed out: http://example.com/?1 -
21:06:56 INFO - Not taking screenshot here: see the one that was previously logged
21:06:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js | Found a tab after previous test timed out: http://example.com/?0 -
21:06:56 INFO - GECKO(2001) | ++DOCSHELL 0x11ab0c800 == 1 [pid = 2006] [id = {0ce36c01-5b48-2f4b-82ec-c5dc086a91db}]
21:06:56 INFO - GECKO(2001) | ++DOMWINDOW == 1 (0x10b683400) [pid = 2006] [serial = 45] [outer = 0x0]
21:06:56 INFO - GECKO(2001) | ++DOMWINDOW == 2 (0x10b6e0c00) [pid = 2006] [serial = 46] [outer = 0x10b683400]
21:06:56 INFO - checking window state
21:06:56 INFO - GECKO(2001) | ++DOMWINDOW == 11 (0x10e190400) [pid = 2001] [serial = 80] [outer = 0x11ee9f000]
21:06:56 INFO - GECKO(2001) | ++DOMWINDOW == 12 (0x112ae8000) [pid = 2001] [serial = 81] [outer = 0x11ee9f000]
21:06:56 INFO - GECKO(2001) | --DOMWINDOW == 1 (0x11fbd1800) [pid = 2014] [serial = 41] [outer = 0x0] [url = http://example.com/?0]
21:06:56 INFO - GECKO(2001) | --DOCSHELL 0x110724800 == 0 [pid = 2014] [id = {6a362b31-4307-3245-bf4f-b34d3a2b1f12}]
21:06:56 INFO - GECKO(2001) | --DOMWINDOW == 0 (0x1107d5400) [pid = 2014] [serial = 39] [outer = 0x0] [url = http://example.com/?0]
21:06:57 INFO - GECKO(2001) | --DOMWINDOW == 1 (0x119006400) [pid = 2009] [serial = 1] [outer = 0x0] [url = about:newtab]
21:06:57 INFO - GECKO(2001) | --DOCSHELL 0x1111df000 == 0 [pid = 2009] [id = {860a05fc-c2c8-8e47-a3a2-bd8537396946}]
21:06:57 INFO - GECKO(2001) | --DOMWINDOW == 0 (0x1190d0000) [pid = 2009] [serial = 3] [outer = 0x0] [url = about:newtab]
21:06:58 INFO - GECKO(2001) | --DOMWINDOW == 11 (0x1219ed800) [pid = 2001] [serial = 9] [outer = 0x0] [url = about:blank]
21:06:58 INFO - GECKO(2001) | --DOCSHELL 0x11a7c5000 == 0 [pid = 2008] [id = {23d871c5-0ab3-7a4b-ab7f-49f3f4662b30}]
21:06:58 INFO - GECKO(2001) | --DOMWINDOW == 1 (0x1229ddc00) [pid = 2008] [serial = 40] [outer = 0x0] [url = about:blank]
21:06:58 INFO - GECKO(2001) | --DOMWINDOW == 0 (0x124066c00) [pid = 2008] [serial = 42] [outer = 0x0] [url = about:blank]
21:06:59 INFO - GECKO(2001) | Completed ShutdownLeaks collections in process 2016

Flags: needinfo?(oriol-bugzilla)
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8dee9d61a77b
Backed out changeset e0ff6bf01a9f for TV and bc failure in browser/base/content/test/tabs/browser_multiselect_tabs_move_to_new_window_contextmenu.js
Blocks: 1521923
See Also: 1521923

I was puzzled because various media tests were failing in try, but central is also affected so it's not my fault: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b569df0ee4a13748d4b51c48650ed258fe0b7486

I think the only problem with my patch was in browser/base/content/test/tabs/browser_multiselect_tabs_reopen_in_container.js, which uses

await addTab("http://mochi.test:8888/3", {createLazyBrowser: true})

However, a lazy tab is not loaded even if you insert its browser, so the promise won't be resolved. I guess previously the test worked because the tab wasn't really marked as lazy.

So this should do the trick:

BrowserTestUtils.addTab(gBrowser, "http://mochi.test:8888/3", {createLazyBrowser: true});
Flags: needinfo?(oriol-bugzilla)
Keywords: checkin-needed

Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e0887fd6a16
Preserve lazyness when moving tabs into a new window. r=jaws

Keywords: checkin-needed
Depends on: 1524254
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Depends on: 1524223
See Also: → 1525634
Blocks: 1446426
Depends on: 1524224
Regressions: 1621984
You need to log in before you can comment on or make changes to this bug.