Closed Bug 837061 Opened 11 years ago Closed 11 years ago

Use plain JS property for tab._fullyOpen to decouple from binding destruction upon tab movement

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 21

People

(Reporter: tabmix.onemen, Assigned: fryn)

Details

Attachments

(1 file)

gBrowser.moveTabTo trigger tab constructor which reset all the tab filed

After moving a tab tab._fullyOpen set back to false

to test it, open few tabs then from Scratchpad window run:
var tab = gBrowser.tabs[gBrowser.tabs.length-1];
Services.console.logStringMessage("before tab moved tab._fullyOpen " + tab._fullyOpen);
gBrowser.moveTabTo(tab, 0);
Services.console.logStringMessage("after tab moved tab._fullyOpen " + tab._fullyOpen);


Result in the console:
before tab moved tab._fullyOpen true
after tab moved tab._fullyOpen false
I thought I had fixed this, but I guess my fix was part of a larger patch that was landed and then backed out a long time ago.
Assignee: nobody → fyan
Status: NEW → ASSIGNED
Summary: After moving a tab tab._fullyOpen set back to false → Use plain JS property for tab._fullyOpen to decouple from binding destruction upon tab movement
Attached patch patchSplinter Review
Attachment #708997 - Flags: review?(dao)
maybe it is best to initiate all the tab property in addTab

remember that tab.closing is also important property, is it possible that the binding destruction is also the cause of bug 608589 ?
maybe some other action trigger tab binding to reconstruct ?
Attachment #708997 - Flags: review?(dao) → review+
(In reply to onemen.one from comment #3)
> maybe it is best to initiate all the tab property in addTab
> 
> remember that tab.closing is also important property, is it possible that
> the binding destruction is also the cause of bug 608589 ?
> maybe some other action trigger tab binding to reconstruct ?

I think unlikely, but I don't know, but since XBL is neither truly spec'd nor clearly not well understood by even the few people who use it (us), it's probably best simply to stop using it when sensible and possible.

https://hg.mozilla.org/integration/mozilla-inbound/rev/96302c19380f
Target Milestone: --- → Firefox 21
https://hg.mozilla.org/mozilla-central/rev/96302c19380f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 868595
Depends on: 866254
No longer depends on: 866254
No longer depends on: 868595
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: