Closed Bug 920224 Opened 11 years ago Closed 11 years ago

Intermittent TEST-UNEXPECTED-FAIL | browser_876926_customize_mode_wrapping.js | Unexpected exception: TypeError: panelEl is undefined

Categories

(Firefox :: Toolbars and Customization, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28
Tracking Status
firefox26 --- unaffected
firefox27 --- unaffected
firefox28 --- fixed
firefox-esr24 --- unaffected

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure, Whiteboard: [Australis:M9][Australis:P1])

Attachments

(2 files, 1 obsolete file)

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js | Unexpected exception: TypeError: panelEl is undefined With stack: afterPanelOpen@chrome://mochitests/content/browser/browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js:158

I suspect this is a pretty simple thing to fix: the window open code should have an option to wait for delayed startup to have finished. Right now it doesn't, so there's no guarantee PanelUI.init will have run (it just usually has, which is why this failure is so rare). That said, we could (maybe should) also make PanelUI's getters just be lazy self-overwriting getters, which would eliminate the need for creating those references in init. We'd still need to fix the test because it tries to open the panel - which will definitely not work before init has been called.
We should probably at least do this bit.
Attachment #809451 - Flags: review?(bmcbride)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attached patch add getters immediately, (obsolete) — Splinter Review
But perhaps we should also consider this?
Attachment #809470 - Flags: review?(bmcbride)
Comment on attachment 809470 [details] [diff] [review]
add getters immediately,

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

Er, why not just move |PanelUI.init()| from browser.js to the end of panelUI.js ? It's a pattern we use everywhere, and it makes it more obvious what's going on.
Attachment #809470 - Flags: review?(bmcbride) → review-
Comment on attachment 809451 [details] [diff] [review]
make test wait for delayed startup,

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

I suppose if we weren't having trouble with the window already being loaded, then we won't have trouble with delayed-startup already having finished.
Attachment #809451 - Flags: review?(bmcbride) → review+
Well, duh. Much more sensible.
Attachment #810438 - Flags: review?(bmcbride)
Attachment #809470 - Attachment is obsolete: true
Attachment #810438 - Flags: review?(bmcbride) → review+
https://hg.mozilla.org/projects/ux/rev/f80b3c1cd29b
https://hg.mozilla.org/projects/ux/rev/a257f4a1591a
Whiteboard: [Australis:M9][Australis:P1] → [Australis:M9][Australis:P1][fixed-in-ux]
(In reply to :Gijs Kruitbosch from comment #6)
> Created attachment 810438 [details] [diff] [review]
> initialize panelUI immediately,
> 
> Well, duh. Much more sensible.

Backed out because of mochitest orange.

https://hg.mozilla.org/projects/ux/rev/af53342e5e4d

Because you see, inbetween my writing the original version of this patch, and my writing per the suggestion of Unfocused, someone added stuff to init, namely:

    this.menuButton.addEventListener("mousedown", this);
    this.menuButton.addEventListener("keypress", this);

which means calling init before the document is loaded is no longer possible, so a more elaborate patch would be needed.

(this bug can remain fixed because the *other*, test-only, cset, should work just fine in avoiding the random orange this bug was filed about)
Can we just delay adding those event listeners?
(In reply to Jared Wein [:jaws] from comment #9)
> Can we just delay adding those event listeners?

Yea, I think it might be worth doing that. Having the PanelUI object half (or all?) broken during that period of startup is a footgun.
https://hg.mozilla.org/mozilla-central/rev/f80b3c1cd29b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M9][Australis:P1][fixed-in-ux] → [Australis:M9][Australis:P1]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: