Closed
Bug 651311
Opened 14 years ago
Closed 14 years ago
Race condition in TabView._initFrame()
Categories
(Firefox Graveyard :: Panorama, defect)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 6
People
(Reporter: tabutils+bugzilla, Assigned: ttaubert)
References
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0a1) Gecko/20110419 Firefox/6.0a1
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:6.0a1) Gecko/20110419 Firefox/6.0a1
See the following steps.
Reproducible: Always
Steps to Reproduce:
1. Restart Firefox and ensure Panorama is not initialized
2. Execute the following in JS shell:
TabView.moveTabTo(gBrowser.mTabs[1], null);
TabView.moveTabTo(gBrowser.mTabs[2], gBrowser.mTabs[1]._tabViewTabItem.parent.id);
Actual Results:
Only gBrowser.mTabs[1] is moved to new group. Moving gBrowser.mTabs[2] fails.
Expected Results:
Both tabs are moved to the new group.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → tim.taubert
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Updated•14 years ago
|
Summary: Moving multiple tabs sequentially to new group fails → Race condition in TabView._initFrame()
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #527228 -
Flags: feedback?(raymond)
Comment 2•14 years ago
|
||
Comment on attachment 527228 [details] [diff] [review]
patch v1
Looks fine.
+ _initFrame: (function () {
+ let isLoading = false;
+ let callbacks = [];
However, it might be better to follow the coding convention i.e. make isLoading callback as variables of TabView and remove the anonymous function.
Attachment #527228 -
Flags: feedback?(raymond) → feedback+
Assignee | ||
Comment 3•14 years ago
|
||
(In reply to comment #2)
> However, it might be better to follow the coding convention i.e. make isLoading
> callback as variables of TabView and remove the anonymous function.
True, fixed.
Attachment #527228 -
Attachment is obsolete: true
Attachment #527267 -
Flags: review?(ian)
Assignee | ||
Comment 4•14 years ago
|
||
Comment 5•14 years ago
|
||
Comment on attachment 527267 [details] [diff] [review]
patch v2
> _initFrame: function TabView__initFrame(callback) {
>- if (this._window) {
>- if (typeof callback == "function")
>+ if (typeof callback == "function") {
>+ if (this._window) {
> callback();
>- } else {
...
>+ return;
> }
>
>- this._setBrowserKeyHandlers();
>+ this._initFrameCallbacks.push(callback);
> }
>+
>+ if (this._isFrameLoading)
>+ return;
>+
>+ this._isFrameLoading = true;
This new logic doesn't account for the possibility that this._window exists but no callback is used; please fix.
Otherwise looking good.
Attachment #527267 -
Flags: review?(ian) → review-
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #527267 -
Attachment is obsolete: true
Attachment #527831 -
Flags: review?(ian)
Comment 7•14 years ago
|
||
Comment on attachment 527831 [details] [diff] [review]
patch v3
Lovely, thanks!
Attachment #527831 -
Flags: review?(ian) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #527831 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 10•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 6
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•