Context menus stop working when login manager fails to initialize (gContextMenu is null when Services.logins is undefined)

VERIFIED FIXED

Status

()

Firefox
Menus
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: Kestrel, Assigned: rittme)

Tracking

({regression})

42 Branch
regression
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox41 unaffected, firefox42- affected, firefox43+ verified)

Details

(Reporter)

Description

3 years ago
After migrating a profile to 42.0a2 the context menus stopped working.

> TypeError: Services.logins is undefined
> TypeError: gContextMenu is null

The Services.logins error was caused by a bad cert8.db, removing it fixed both of the errors and the context menus worked again. The profile worked perfectly previously despite the bad cert8.db (I never used the password manager). Ideally context menus should be able to handle an uninitialized login manager more gracefully.

The error occurs in nsContextMenu.js on Services.logins.isLoggedIn
> initPasswordManagerItems: function() {
>     let showFillPassword = this.onPassword;
>     let disableFillPassword = !Services.logins.isLoggedIn || this.target.disabled || this.target.readOnly;
(Reporter)

Updated

3 years ago
Blocks: 433238
Keywords: regression

Comment 1

3 years ago
Do you have the bad cert8.db to test?
(Reporter)

Comment 2

3 years ago
(In reply to Loic from comment #1)
> Do you have the bad cert8.db to test?

See Bug 1197746

Comment 3

3 years ago

Reg range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=91de9c670800&tochange=943b79d9c65f
Status: UNCONFIRMED → NEW
status-firefox41: --- → unaffected
status-firefox42: --- → affected
status-firefox43: --- → affected
tracking-firefox42: --- → ?
tracking-firefox43: --- → ?
Ever confirmed: true
Flags: needinfo?(bernardo)
(Assignee)

Comment 4

3 years ago
This should be fixed by my patch for bug 1188719.
Depends on: 1188719
Flags: needinfo?(bernardo)
(Assignee)

Updated

3 years ago
Assignee: nobody → bernardo
Status: NEW → ASSIGNED
Iteration: --- → 43.2 - Sep 7
Flags: qe-verify+
What was the regressing bug? 
Did this break all context menus or just the ones for the password manager?
tracking-firefox42: ? → +
tracking-firefox43: ? → +
Flags: needinfo?(bernardo)
Flags: needinfo?(MattN+bmo)

Comment 6

3 years ago
It regressed by Bug 433238.
(Reporter)

Comment 7

3 years ago
It affects all context menus, clicking on a context menu item does not perform the desired action and produces an error ("gContextMenu is null").
(Assignee)

Comment 8

3 years ago
The patch for bug 1188719 landed yesterday and should fix this problem.

This is the exact line of code that fixes is:
https://hg.mozilla.org/mozilla-central/rev/7d91d1ee473d#l3.27
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(bernardo)
Flags: needinfo?(MattN+bmo)
Resolution: --- → FIXED
Setting the correct flag for tracking on the QA side.
status-firefox43: affected → fixed
I am going to track bug 1188719 instead.
tracking-firefox42: + → -
QA Contact: camelia.badau
I wasn't able to reproduce the original issue using affected build: Aurora 42.0a2, buildID: 20150823004007. 
Tried with the bad cert8.db (from bug 1197746), but the context menu works fine for me. 

Can you please verify that the original issue is fixed?
Flags: needinfo?(kestrel)
(Reporter)

Comment 12

3 years ago
Retested build 20150823004007 and can reproduce bug on Ubuntu 15.10.

In latest 42 beta using the same profile with bad cert8.db, opening context menu produces an error in console like before but gContextMenu is not null and context menu still works properly.

Verified as fixed.
Flags: needinfo?(kestrel)
Thank you!
I would like to ask you to verify also on latest Aurora 43.0a2 (since the tracking flag for 43 is marked as fixed).
(Reporter)

Comment 14

3 years ago
Confirmed fixed on latest 43 also.
Thank you, Kestrel!

Marking verified fixed based on comment 14.
Status: RESOLVED → VERIFIED
status-firefox43: fixed → verified
You need to log in before you can comment on or make changes to this bug.