Lazy tab prematurely inserted when moved into another window

RESOLVED FIXED in Firefox 67

Status

()

defect
P3
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: Oriol, Assigned: Oriol)

Tracking

(Depends on 1 bug, Blocks 1 bug)

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

5 months ago
  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.

Assignee

Comment 1

5 months ago

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

Priority: -- → P3
Assignee

Updated

5 months ago
See Also: → 1521923
Assignee

Comment 2

5 months ago

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

Comment 3

5 months ago

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)

Comment 5

5 months ago
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
Assignee

Comment 6

5 months ago

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)
Assignee

Updated

5 months ago
Keywords: checkin-needed

Comment 7

5 months ago

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

Comment 8

5 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Assignee

Updated

5 months ago
Depends on: 1524223
Assignee

Updated

5 months ago
See Also: → 1525634
Assignee

Updated

4 months ago
Blocks: 1446426
Assignee

Updated

4 months ago
Depends on: 1524224
You need to log in before you can comment on or make changes to this bug.