browserAction forWindow checks

RESOLVED FIXED in Firefox 66

Status

enhancement
P2
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Tracking

unspecified
mozilla66
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 months ago
While working on incognito support and fixing an issue in CUI code, I noticed that we often have code in ext-browserAction that does something like:

let widget = widget.forWindow(window);
if (!widget) ...

The issue here is, forWindow[1] always returns a widgetWrapper instance which contains the node if one exists[2].  I believe the checks should be:

if (!widget.node) ...

We should review our use of CUI and make sure we're handling this correctly.

[1] https://searchfox.org/mozilla-central/rev/8a135a9c5a96b59269f544fcaee76d8fd5a7026a/browser/components/customizableui/CustomizableUI.jsm#4014

[2] https://searchfox.org/mozilla-central/rev/8a135a9c5a96b59269f544fcaee76d8fd5a7026a/browser/components/customizableui/CustomizableUI.jsm#4067
(Assignee)

Updated

4 months ago
Assignee: nobody → mixedpuppy
Priority: -- → P2
(Assignee)

Updated

4 months ago
Blocks: 1511636

Comment 3

3 months ago
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfd9ddf7b03b
fix widget.node checks in browserAction code, r=rpl

Comment 4

3 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

Comment 5

3 months ago

Hi, will this bug require manual validation from the QA team? if so please specify how to correctly validate it, thanks!

Flags: needinfo?(mixedpuppy)
(Assignee)

Comment 6

3 months ago

Existing tests should handle it just fine.

Flags: needinfo?(mixedpuppy) → qe-verify-
You need to log in before you can comment on or make changes to this bug.