Closed Bug 495410 Opened 17 years ago Closed 17 years ago

Firefox 3.5b4 crashes when programatically removing all tabs.

Categories

(Firefox :: Tabbed Browser, defect)

3.5 Branch
x86
macOS
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: souqueta, Unassigned)

Details

(Keywords: testcase, Whiteboard: closeme 2009-08-15)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10 GlubbleBundle/2.0.4.5 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10 Not sure yet if this bug is provocated by the context (in my extension) of the following code: for (let i = tabs.length - 1; i >= 0; i--) { aWindow.getBrowser().removeTab(tabs[i]); } Above instructions are correctly working on Firefox 3.0.10, but not on Firefox 3.5b4. The effect is that the browser crashes and cannot restart as expected. Starting the same profile with 3.0.10 allows me to start correctly back with 3.5b4. Reproducible: Always
Thanks for the testcase. It looks that this code just closes the window with the last tab - that's also what happens if you close the tabs with Cmd+W manually. The application is still running, you can open a new window. Not sure what you mean by "cannot restart as expected". It doesn't actually crash for you (bringing the crash reporter window), does it?
Keywords: testcase
Whiteboard: closeme 2009-08-15
Version: unspecified → 3.5 Branch
What is confusing is the difference of behavior, between 3.0.11 and 3.5. - In 3.0.11, closing tabs don't have any impact on the window, and it will always remain one empty tab. - In 3.5, closing tabs can have an impact on the window, closing it. It basically means, that you shouldn't consider your browser window opened anymore, after closing all the tabs. If you do, this might lead to problems, as I tried to describe in this bug. To answer to your question, yes, I see the crash reporter window, when, in my extension, I assume that my browser window is still opened, after removing all tabs. This happens after trying to open new tabs, after removing all the existing ones. It was possible to workaround it, making sure that tabs were added, before the other ones were removed. So indeed, it might actually not have to be considered as a bug, which I opened due to my lack of understanding. Maybe a documentation is enough afterall.
The Cmd+W behavior was changed between 3.0 and 3.5 too, wasn't it? See bug 456405. If you actually crash when doing something with the closed window in JavaScript, it makes sense to file a bug specifically about that (with a testcase and the crash report you can obtain as described at https://developer.mozilla.org/en/How_to_get_a_stacktrace_for_a_bug_report ), if you can't find a similar one already filed. If you have ideas about where to note this change of behavior in documentation, please change it (on developer.mozilla.org, which is editable wiki) or file a documentation bug. Resolving this one.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: