Closed Bug 1405442 Opened 8 years ago Closed 8 years ago

discardBrowser not working for many tabs that have onbeforeunload event handler

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1415918

People

(Reporter: kernp25, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20171002100134 Steps to reproduce: Execute this code in Scratchpad (in the browser context): for (var t of gBrowser.tabs) { gBrowser.discardBrowser(t.linkedBrowser); } Actual results: Many tabs will not discard/unload because of this line: aBrowser.frameLoader.tabParent.hasBeforeUnload [1] By many i mean 12 of 25. [1] https://dxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#2500 Expected results: Tabs should have discard/unload successfully.
Flags: needinfo?(dao+bmo)
Blocks: 1284886
Status: UNCONFIRMED → NEW
Component: General → Tabbed Browser
Ever confirmed: true
Flags: needinfo?(dao+bmo)
Priority: -- → P3
(In reply to kernp25 from comment #0) > User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:58.0) Gecko/20100101 > Firefox/58.0 > Build ID: 20171002100134 > > Steps to reproduce: > > Execute this code in Scratchpad (in the browser context): > > for (var t of gBrowser.tabs) { > gBrowser.discardBrowser(t.linkedBrowser); > } > > > Actual results: > > Many tabs will not discard/unload because of this line: > aBrowser.frameLoader.tabParent.hasBeforeUnload [1] > > By many i mean 12 of 25. > > [1] > https://dxr.mozilla.org/mozilla-central/source/browser/base/content/ > tabbrowser.xml#2500 > > > Expected results: > > Tabs should have discard/unload successfully. I am unable to reproduce this. It is unclear what your session looks like that you are running this on and how you are making your determinations. What urls are loaded in the tabs? about: urls run in the parent process and thus will not be discarded. Only remote tabs will be discarded. Are all tabs tested in the non-lazy state to begin with? The test for permitting running discard code has several conditions besides aBrowser.frameLoader.tabParent.hasBeforeUnload. How are you determining if this is the point of rejection, are you using a debugger for that?
I think this bug is not valid anymore? https://bugzilla.mozilla.org/show_bug.cgi?id=1415918 fixed now this issue.
Flags: needinfo?(dao+bmo)
Yeah, this was the same issue.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(dao+bmo)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.