Closed Bug 1543190 Opened 7 years ago Closed 6 years ago

Autocomplete throws for null

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

Details

Attachments

(1 external file)

Open console, enter var value = null.
Then type value.

In the browser console you can see that autocomplete has thrown:

Handler function JSPropertyProvider threw an exception: TypeError: result is null
Stack: getProperty@resource://devtools/shared/webconsole/js-property-provider.js:849:5
getExactMatchImpl@resource://devtools/shared/webconsole/js-property-provider.js:751:18
getVariableInEnvironment@resource://devtools/shared/webconsole/js-property-provider.js:647:10
JSPropertyProvider@resource://devtools/shared/webconsole/js-property-provider.js:434:11
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:109:14
autocomplete@resource://devtools/server/actors/webconsole.js:1186:22
onPacket@resource://devtools/server/main.js:1286:15
receiveMessage@resource://devtools/shared/transport/child-transport.js:66:5
Line: 849, column: 5

failed autocomplete

error: "unknownError"
from: "server1.conn45.child1/consoleActor2"
message: "error occurred while processing 'autocomplete: TypeError: result is undefined\nStack: autocomplete@resource://devtools/server/actors/webconsole.js:1215:7\nonPacket@resource://devtools/server/main.js:1286:15\nreceiveMessage@resource://devtools/shared/transport/child-transport.js:66:5\nLine: 1215, column: 7"

​

error occurred while processing 'autocomplete: TypeError: result is undefined
Stack: autocomplete@resource://devtools/server/actors/webconsole.js:1215:7
onPacket@resource://devtools/server/main.js:1286:15
receiveMessage@resource://devtools/shared/transport/child-transport.js:66:5
Line: 1215, column: 7

Look at https://searchfox.org/mozilla-central/search?q=typeof&case=false&regexp=false&path=js-property-provider.js, there are various typeof value == "object".

This is not the proper way to check whether something is an object, please use something reliable like Object(value) === value.

Priority: -- → P2
Assignee: nobody → oriol-bugzilla

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:Oriol, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(oriol-bugzilla)

we're investigating a TRY-only test failure, hence not landing the patch yet

Flags: needinfo?(oriol-bugzilla)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4fd51b571583 Fix console autocomplete throwing for null. r=nchevobbe
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
QA Whiteboard: [qa-74b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: