Closed Bug 344587 Opened 18 years ago Closed 18 years ago

Dispatch tab open/close events in the correct order

Categories

(Firefox :: Tabbed Browser, defect)

2.0 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 2 beta2

People

(Reporter: zeniko, Assigned: zeniko)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

The underlying cause of bug 343422 should still be fixed:

When the last tab is closed (and the window is not), a new tab is added before the old tab is removed. The tab events are however dispatched in the inverse order (TabClose and then TabOpen) which might break other code in the future.
Attached patch fix (obsolete) — Splinter Review
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #229152 - Flags: review?(sspitzer)
I agree simon, we should fix this.

cc'ing dietrich, in case changing this order might affect session restore in a way that I'm not thinking of.
Looking through Dietrich's modifications to SessionStore, I don't see how this could have any effect:

On TabOpen we just attach event listeners to the tab and schedule a disk save operation; and on TabClose we fetch the data for that tab for the Restore... list, detach the listeners and also schedule a disk save operation. The only place where problems could be possible is during the data fetching - and that obviously doesn't depend on whether the event listeners on the new tab are already installed.
Flags: blocking-firefox2?
Whiteboard: [has patch][needs review sspitzer]
Flags: blocking-firefox2? → blocking-firefox2+
Comment on attachment 229152 [details] [diff] [review]
fix

Simon, can you update this patch to tip?
Attachment #229152 - Attachment is obsolete: true
Attachment #229152 - Flags: review?(sspitzer)
simon / asaf:  I'll work on updating, reviewing and driving this in today.  sorry for the delay.
Attachment #230513 - Flags: superreview? → superreview?(mconnor)
Comment on attachment 230513 [details] [diff] [review]
simon's patch, updated to branch (with comment changed)

this patch seems correct (and low risk) to me, but being so close to b2, I'd like to make sure dietrich and asaf agree.
Attachment #230513 - Flags: review?(dietrich)
Comment on attachment 230513 [details] [diff] [review]
simon's patch, updated to branch (with comment changed)

looks goog and safe to me, r=mano.
Attachment #230513 - Flags: review?(bugs.mano) → review+
Whiteboard: [has patch][needs review sspitzer] → [has patch][seeking additional reviews from dietrich and mconnor]
Comment on attachment 230513 [details] [diff] [review]
simon's patch, updated to branch (with comment changed)

three sets of eyes are totally enough!
Attachment #230513 - Flags: superreview?(mconnor)
Attachment #230513 - Flags: superreview+
Attachment #230513 - Flags: review?(dietrich)
Whiteboard: [has patch][seeking additional reviews from dietrich and mconnor] → [has patch][need-a]
seth landed this on trunk yesterday.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
> seth landed this on trunk yesterday

whoops, I just landed it now.

yesterday, in a state of confusion, I landed it on  branch only, and then backed myself after realizing I had sr from mconnor, not a=.

but I forgot to land it on the trunk!
Comment on attachment 230513 [details] [diff] [review]
simon's patch, updated to branch (with comment changed)

a=drivers. Please land on the MOZILLA_1_8_BRANCH.
Attachment #230513 - Flags: approval1.8.1? → approval1.8.1+
Whiteboard: [has patch][need-a] → [checkin needed (1.8 branch)]
fixed on branch.

thanks again to simon for this fix.
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
Depends on: 347662
Verified using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) Gecko/20060828 BonEcho/2.0b2 ID:2006082803.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: