Logspam in the browser console when trying to access a property in a devtools console
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
People
(Reporter: robwu, Unassigned)
References
Details
STR:
- Visit
about:config
and setchrome.devtools.enabled
to true.
(this is to unlock the console input in the global JS console; the pref is not needed if you run step 3 from a tab's console instead of the global JS console) - Open the global JS console (Ctrl-Shift-J, to view browser errors).
- Focus the input of the console and type:
1[0].
(this may look like nonsense, but this is the minimal reproduction that I can come up with. In practice, I tried to type code that would return an array, and intended to do something with an element:[0].
).
Expected:
- No errors in the global JS console.
Actual:
TypeError: properties.shift().trim is not a function ... in
resource://devtools/shared/webconsole/js-property-provider.js:274
Error while calling actor 'console's method 'autocomplete' can't access property "matches", result is undefined ... in resource://devtools/server/actors/webconsole.js:1401
The real issue is probably the first error, but it wouldn't hurt to also fix the second one by changing === null
to == null
at https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/devtools/server/actors/webconsole.js#1388
Comment 1•5 years ago
|
||
The severity field is not set for this bug.
:nchevobbe, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
The first part of the bug got fixed by the patch from bug 1651470.
What remains (to fix the second error) is to replace === null
with == null
at https://searchfox.org/mozilla-central/rev/828f2319c0195d7f561ed35533aef6fe183e68e3/devtools/server/actors/webconsole.js#1394
Comment 3•5 years ago
|
||
All the error are gone, and I think we can close this bug.
(In reply to Rob Wu [:robwu] from comment #2)
What remains (to fix the second error) is to replace
=== null
with== null
at https://searchfox.org/mozilla-central/rev/828f2319c0195d7f561ed35533aef6fe183e68e3/devtools/server/actors/webconsole.js#1394
I don't think there's an issue with this code. JSPropertyProvider
only return objects or null
when an error was encountered.
Am I missing something Rob?
Reporter | ||
Comment 4•5 years ago
|
||
JSPropertyProvider
is exported via makeInfallible, which returns undefined on failure:
Description
•