Closed Bug 615674 Opened 14 years ago Closed 13 years ago

Removing dependency on `_tabOptions` property in Tabs APIs

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: irakli, Unassigned)

References

Details

Bug 613553 - Moved logic of applying tab settings form constructor to a TabList.open function but not everywhere, following pull request removes old logic and moves functionality where it was left.    

https://github.com/mozilla/addon-sdk/pull/65
See Also: → 613553
The key conceptual point here is that there are two ways of treating the Tab constructor: it can either be a function that creates a tab, constructing the underlying XUL <tab> element and setting its attributes as appropriate, or it can be a function that wraps a tab that has just been created, reflecting its attributes to API consumers.

Currently, the code conflates these two ways of treating the constructor, using it to both wrap a newly-created tab and set some of its attributes.  Hence bugs like the one in bug 613553, where a tab created via another API (in this case the SDK's tab-browser module, but it could just as well have been core Firefox code) is wrapped by the constructor and then has an attribute (active status) mistakenly applied by that constructor based on the it's mistaken assumption that the tab was created by its own tabs module.

The fix is to treat the constructor as only a constructor or a wrapper, but not both.
Status: NEW → RESOLVED
Closed: 13 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.