Closed Bug 909782 Opened 11 years ago Closed 11 years ago

TabLists inheriting from BrowserTabList need to be updated to change "iterator" to "getList"

Categories

(DevTools :: Debugger, defect, P1)

26 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: bbenvie, Assigned: bbenvie)

References

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

Recently, in bug 899052 BrowserTabList.prototype was updated to change its "iterator" method to a "getList" method which returns a promise for the items. MetroTabList and MobileTabList both override this with their own, but they were not updated in the original bug. This causes remote debugging to not work on either of them.
Blocks: 899052
Keywords: regression
Version: Trunk → 26 Branch
Attached patch WIP1 (obsolete) — Splinter Review
This patch refactors `BrowserTabList.prototype.getList` to defer to two new methods, `_getBrowser` and `_getChildren`. These are the only two differences between it and the subclsses of it. The subclasses have had their `iterator` method removed and had these two new methods implemented.
Assignee: nobody → bbenvie
Status: NEW → ASSIGNED
Attached patch WIP2 (obsolete) — Splinter Review
Change "selectedTab" to "selectedBrowser" which is more accurate.
Attachment #796069 - Attachment is obsolete: true
Attached patch WIP3 (obsolete) — Splinter Review
Rename "_getBrowser" to "_getSelectedBrowser".
Attachment #796074 - Attachment is obsolete: true
Attachment #796077 - Flags: review?(mbrubeck)
Attachment #796077 - Flags: review?(margaret.leibovic)
Comment on attachment 796077 [details] [diff] [review]
WIP3

Review of attachment 796077 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!  r=mbrubeck for the Metro part.  However, some drive-by comments:

B2G also extends this object and will need to be updated:
http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/dbg-browser-actors.js

::: mobile/android/chrome/content/dbg-browser-actors.js
@@ +60,3 @@
>  
> +MobileTabList.prototype._getChildren = function(aWindow) {
> +  return aWindow.BrowserApp.tabs;

This should be:

  return aWindow.BrowserApp.tabs.map(tab => tab.browser);
Attachment #796077 - Flags: review?(mbrubeck) → review+
Comment on attachment 796077 [details] [diff] [review]
WIP3

Review of attachment 796077 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me with mbrubeck's comment addressed.
Attachment #796077 - Flags: review?(margaret.leibovic) → review+
Attached patch WIP4Splinter Review
Addresses mbrubeck's feedback.

* Fix MobileTabList._getChildren
* Change ContentTabList.prototype.iterator to getList that returns a promise resolving to an array containing the single actor.
Attachment #796077 - Attachment is obsolete: true
Attachment #796518 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/6882de8ed28a
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: