Closed Bug 1558635 Opened 5 years ago Closed 5 years ago

Avoid initializing CE in the customization palette

Categories

(Firefox :: Toolbars and Customization, task, P3)

task

Tracking

()

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxperf:p3])

Attachments

(1 file)

On startup in my local build and mach run profile I see:

JavaScript error: chrome://browser/content/search/searchbar.js, line 164: TypeError: this._textbox is undefined

in the stderr, with the stack in the browser console being:

destroy chrome://browser/content/search/searchbar.js:164
    destroy self-hosted:1001
    disconnectedCallback chrome://browser/content/search/searchbar.js:366
    onDOMContentLoaded chrome://browser/content/browser.js:1469
    onDOMContentLoaded self-hosted:1003

This seems... very wrong.

Brian, I don't recall seeing this a week or two ago, any idea what changes might have tripped this?

Flags: needinfo?(bgrinstead)

The searchbar error here is being worked on in bug 1557869. I think this is probably a dupe?

(In reply to Mark Banner (:standard8) from comment #1)

The searchbar error here is being worked on in bug 1557869. I think this is probably a dupe?

Thanks. I'd prefer to morph this to be about the underlying problem that the disconnected code in the searchbar just exposes, so I'll do that.

I'm pretty sure we didn't use to pay this cost for XBL bindings, so we shouldn't pay it here. We shouldn't be initializing things that are in the palette at all, and should also not be disconnecting them.

Perhaps there's a (probably small) startup win here if we templatize the contents of the palette and don't un-templatize until customizableui needs something it can't find elsewhere?

Summary: The search box is initializing in the palette and this is making it unhappy → Figure out how to avoid initializing CE in the customization palette

(In reply to :Gijs (he/him) from comment #2)

Perhaps there's a (probably small) startup win here if we templatize the contents of the palette and don't un-templatize until customizableui needs something it can't find elsewhere?

Note that if we go this route, we probably want to optimize the case where there's an uninstalled extension (ie external buttons will never be in the template) in the placements, which would trip this un-templatizing, by hardcoding the list of items in the template somewhere.

Priority: -- → P3

We should be able to use html:template to avoid paying this cost.

Blocks: 1624683
Severity: normal → S3
Type: defect → task
Component: Search → Toolbars and Customization
Summary: Figure out how to avoid initializing CE in the customization palette → Avoid initializing CE in the customization palette
Whiteboard: [fxperf:p3]
Version: 68 Branch → Trunk
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(bgrinstead)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f5f1227caf70 use an html:template for the customize mode palette to avoid instantiating items in the palette, r=jaws
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
Regressions: 1638264
Blocks: 1515795
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: