Closed Bug 1434045 Opened 6 years ago Closed 6 years ago

TypeError: this._prefs is undefined

Categories

(Firefox :: Toolbars and Customization, defect)

59 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- wontfix
firefox60 --- fixed

People

(Reporter: Oriol, Assigned: Gijs)

References

Details

(Keywords: regression)

Attachments

(1 file)

1. Go to "Customize..."
2. Remove some item from the toolbar, e.g. the useless flexible spaces
3. Restart firefox
4. Whenever you open a new window, this appears in the browser console:

TypeError: this._prefs is undefined
	urlbar_XBL_Destructor chrome://browser/content/urlbarBindings.xml:146:9
	insertWidgetBefore resource:///modules/CustomizableUI.jsm:1290:5
	buildArea resource:///modules/CustomizableUI.jsm:848:9
	registerToolbarNode resource:///modules/CustomizableUI.jsm:765:9
	registerToolbarNode resource:///modules/CustomizableUI.jsm:3176:5
	toolbar_XBL_Constructor chrome://browser/content/customizableui/toolbar.xml:48:11

https://searchfox.org/mozilla-central/rev/97cb0aa64ae51adcabff76fb3b5eb18368f5f8ab/browser/base/content/urlbarBindings.xml#145

Regression window: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=03e5401d560c1a9864bcdff7c4e835fa28575afc&tochange=6cff7451155d9d1bcdcfad795bb79ec8b42a6d06
Flags: needinfo?(florian)
We are destructing a 'urlbar' binding while creating new windows? Why? :-/
(In reply to Florian Quèze [:florian] from comment #1)
> We are destructing a 'urlbar' binding while creating new windows? Why? :-/

The node gets reparented if you customize things such that CUI thinks it needs to occur earlier in the DOM tree than where it is placed by default. Reparenting nodes destructs and then reconstructs bindings.
Flags: needinfo?(florian)
Comment on attachment 8950870 [details]
Bug 1434045 - avoid errors when XBL destructors fire without the constructor having fired,

https://reviewboard.mozilla.org/r/220116/#review226012

Thanks!
Attachment #8950870 - Flags: review?(florian) → review+
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/46cd93930b4e
avoid errors when XBL destructors fire without the constructor having fired, r=florian
https://hg.mozilla.org/mozilla-central/rev/46cd93930b4e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Doesn't seem to be severe enough to worry about backporting to 59 this late in the cycle.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: