Closed
Bug 952963
Opened 12 years ago
Closed 12 years ago
areaType getter in widget wrapper assumes area exists
Categories
(Firefox :: Toolbars and Customization, defect)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
Firefox 29
People
(Reporter: quicksaver, Assigned: Gijs)
References
(Blocks 1 open bug)
Details
(Whiteboard: [Australis:P4][qa-])
Attachments
(1 file)
|
1.86 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
At http://mxr.mozilla.org/mozilla-central/source/browser/components/customizableui/src/CustomizableUI.jsm#2891:
> 2891 this.__defineGetter__("areaType", function() {
> 2892 return gAreas.get(aWidget.currentArea).get("type");
> 2893 });
If I call CUI.getWidget(someID).areaType, it will throw a TypeError if the widget has no area (is in the palette) or is "placed" in a custom toolbar that has been unregistered.
Simple example, make that call from the browser console, using an id from any widget in the palette.
There should be a fail-safe that returns either null for this, just like the one in http://mxr.mozilla.org/mozilla-central/source/browser/components/customizableui/src/CustomizableUI.jsm#2987:
> 2987 this.__defineGetter__("areaType", function() {
> 2988 let placement = CustomizableUIInternal.getPlacementOfWidget(aWidgetId);
> 2989 if (!placement) {
> 2990 return null;
> 2991 }
> 2992
> 2993 return gAreas.get(placement.area).get("type");
> 2994 });
| Reporter | ||
Comment 1•12 years ago
|
||
Addendum: There should be a fail-safe that returns null in this case [...]
| Reporter | ||
Updated•12 years ago
|
Version: unspecified → 29 Branch
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gijskruitbosch+bugs
Blocks: australis-addons
Status: NEW → ASSIGNED
Whiteboard: [Australis:P4]
Version: 29 Branch → Trunk
Comment 3•12 years ago
|
||
Comment on attachment 8355157 [details] [diff] [review]
areaType getter in widget wrapper shouldn't assume area exists,
Review of attachment 8355157 [details] [diff] [review]:
-----------------------------------------------------------------
A test here would be nice.
Attachment #8355157 -
Flags: review?(jaws) → review+
| Assignee | ||
Comment 4•12 years ago
|
||
Landed with test:
https://hg.mozilla.org/integration/fx-team/rev/4bc1cf097ca1
and then promptly backed out and relanded to fix the commit msg to have "Australis":
https://hg.mozilla.org/integration/fx-team/rev/52d2bc346659
https://hg.mozilla.org/integration/fx-team/rev/3f3b0a504f65
Whiteboard: [Australis:P4] → [Australis:P4][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P4][fixed-in-fx-team] → [Australis:P4]
Target Milestone: --- → Firefox 29
Comment 6•12 years ago
|
||
Updated•12 years ago
|
Updated•12 years ago
|
Whiteboard: [Australis:P4] → [Australis:P4][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•