A widget with an invalid view should not break all of CustomizableUI

RESOLVED FIXED in Firefox 28

Status

()

Firefox
Toolbars and Customization
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Unfocused, Assigned: Gijs)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 28
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Australis:M8][Australis:P2])

Attachments

(2 attachments)

When buildWidget detects a widget with a view, and the elemnt for the view can't be found it throws an exception - sadly, this breaks all of CustomizableUI. It, er, shouldn't do that.
Not taking this for Australis:M7.
Whiteboard: [Australis:M?] → [Australis:M?][Australis:P2]
Created attachment 773331 [details] [diff] [review]
Patch

Something like this? :-)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #773331 - Flags: review?(bmcbride)
Created attachment 773336 [details] [diff] [review]
Test

Annnd a test. For the todo, see bug 891926, which I just filed. I'll add a patch there and s/todo/ok/. :-)
Attachment #773336 - Flags: review?(bmcbride)
Comment on attachment 773336 [details] [diff] [review]
Test

>+  requestLongerTimeout(5);

Self-nit: this shouldn't be here (too eager copying from another test, oops!)
Comment on attachment 773331 [details] [diff] [review]
Patch

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

::: browser/components/customizableui/src/CustomizableUI.jsm
@@ +802,1 @@
>            ERROR("Could not find the view node with id: " + aWidget.viewId);

Nit: Since you're here, include the widget id in this log message?
Attachment #773331 - Flags: review?(bmcbride) → review+
Attachment #773336 - Flags: review?(bmcbride) → review+
Folded and pushed: https://hg.mozilla.org/projects/ux/rev/757b3bbe3c63
Whiteboard: [Australis:M?][Australis:P2] → [Australis:M8][Australis:P2][fixed-in-ux]
This was backed out yesterday: https://hg.mozilla.org/projects/ux/rev/a8a320338f33
Whiteboard: [Australis:M8][Australis:P2][fixed-in-ux] → [Australis:M8][Australis:P2]
Relanded with a fix in the tests as https://hg.mozilla.org/projects/ux/rev/56af4ca8e542

using defaultArea for the widget breaks because it sticks around in the default placements after a reset. I'll file a bug on that in the next few hours.
Whiteboard: [Australis:M8][Australis:P2] → [Australis:M8][Australis:P2][fixed-in-ux]
https://hg.mozilla.org/mozilla-central/rev/56af4ca8e542
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M8][Australis:P2][fixed-in-ux] → [Australis:M8][Australis:P2]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.