Open Bug 1750214 Opened 2 years ago Updated 2 months ago

LoginHelper.jsm getElementById() hang when developer console open

Categories

(DevTools :: Console, defect, P3)

Firefox 95
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: simo.bot87, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Steps to reproduce:

Open the widget page on a Wordpress admin area with the dev console opened

Actual results:

Firefox hang, a lot of notices in the console.

È stata trasmessa una stringa vuota a getElementById() LoginHelper.jsm:1460:8

(getElementById() was called with an empty string)

both on 95.0.2 (64 bit) and 97.0b3 (64 bit)

Expected results:

Not hang.

The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Console
Product: Firefox → DevTools
Severity: -- → S3
Priority: -- → P3

We know about console performance issues (and are going to look at them in the next couple months)
I also can't find the line that would be using getElementById in LoginHelper.jsm (https://searchfox.org/mozilla-release/rev/723f2b3dd4f885827602e56f3e79e7aaabe52421/toolkit/components/passwordmgr/LoginHelper.jsm#1460)

simo.bot87, is the page you're seeing this on public?
Also, does clicking on the message location (LoginHelper.jsm:1460) opens the file in the debugger/in a tab? And if so, could you paste the function the line is in?

Blocks: console-perf
Flags: needinfo?(simo.bot87)

dimi, looking at the log it looks like you did some changes in LoginHelper.jsm, would you be aware of such issue?

Flags: needinfo?(dlee)

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #3)

dimi, looking at the log it looks like you did some changes in LoginHelper.jsm, would you be aware of such issue?

We never use getElementById in LoginHelper.jsm (even in the past).
But there might be something we can try, :simo.bot87, could you help test

  1. open about:config
  2. set signon.generation.confidenceThreshold to -1
    and see if you can reproduce this issue? thanks!
Flags: needinfo?(dlee)
Flags: needinfo?(simo.bot87)

(In reply to Dimi Lee [ooo Jan.29 - Feb.5] from comment #4)

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #3)

dimi, looking at the log it looks like you did some changes in LoginHelper.jsm, would you be aware of such issue?

We never use getElementById in LoginHelper.jsm (even in the past).
But there might be something we can try, :simo.bot87, could you help test

  1. open about:config
  2. set signon.generation.confidenceThreshold to -1
    and see if you can reproduce this issue? thanks!

Tested with 97.0b9 (64 bit), signon.generation.confidenceThreshold` to -1
did not hang but 31500 warnings in console, see images above.

Thanks sim.bot87..
So I think element.labels uses getElementById under the hood.
If you navigate to data:text/html,<meta charset=utf8><label id="label1" for="">Label 1</label><input id=""><script>console.log(document.querySelector("input").labels)</script> and open the console, you'll see the getElementById warning message.

Could you share with us what the following expression returns in the console please, just to be sure ? document.querySelectorAll(input[id=""])

Now, I really don't know how we could get rid of such message, as it's not an error. We could try to check if element.id is not an empty string before accessing element.labels in https://searchfox.org/mozilla-release/rev/723f2b3dd4f885827602e56f3e79e7aaabe52421/toolkit/components/passwordmgr/LoginHelper.jsm#1460 , but I'm not sure about this.

I'll file a bug for having a proper warning message when using labels instead of mentioning getElementById.

(filed Bug 1752564 for better warning message)

Attachment #9385148 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: