New issue
Advanced search Search tips

Issue 910968 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

chrome.tabs.discard changes 'id' property of the tab

Reported by serg...@gmail.com, Dec 2

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce the problem:
1. Make sure some tab is loaded, but not selected.
2. Invoke "Lazy Tabs" extension or discard it using other means.
3. Check the tab id using some sort of extension.

What is the expected behavior?
Tab's 'discarded' state changing, but 'id' staying the same.

What went wrong?
Tab 'id' changes. As a result, extensions like "Last Tabs" lose track of the tab.

Did this work before? N/A 

Chrome version: 70.0.3538.110  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 31.0 r0

If changing 'id' is necessary, then extensions must have a way to obtain the new 'id', e.g. introduce chrome.tabs.onDiscard method.
 
Labels: Needs-Triage-M70
Cc: viswa.karala@chromium.org
Labels: Triaged-ET Needs-Feedback
Tried testing the issue on chrome reported version# 70.0.3538.110 using Windows-10 with steps mentioned below:
1) Launched chrome reported version, loaded few tabs and installed "Lazy Tabs" and "Last Tabs" extensions
2) Clicked on 'Lazy Tabs' extension icon and navigated to other tabs where few sites are loaded, on navigating to those tabs, page got reloaded automatically
3) Now clicked on 'Last Tabs' extension icon, able to see the correct order of the last used tabs

@Reporter: Please find the attached screencast for your reference and let us know if we missed anything in reproducing the issue, provide your feedback on it which help in further triaging it in better way.

Thanks!

910968.mp4
2.9 MB View Download
Here's 
1) Launch the reported or latest chrome version (I've now tested with it too), install "Lazy Tabs" and "Last Tabs" extensions.
2) Click on a few tabs to have them shown in 'Last Tabs'.
2) Click on 'Lazy Tabs' extension icon, don't reload any tabs.
3) Now click on 'Last Tabs' and you will see the list is empty.
That's because it records tab id's and they are no longer the same after suspension.

I found out that's the case by injecting this code into its loadRest function in popup.js, before 'if(doReset)showRemainingTabsButton();' line:
		var n=Cr.elm('div',{class:'thinrow'},[
			Cr.elm('span',{class:'thinspan'},[Cr.txt(tabsGotten.length + ' tabs in the list, tabs[2].id = ' + tabs[2].id)])
		]);
		Cr.insertNode(n,_ge('controls'),_ge('controls').firstChild);

Project Member

Comment 4 by sheriffbot@chromium.org, Dec 5

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment