Closed Bug 1861142 Opened 2 months ago Closed 1 month ago

Evaluating `:` throws

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: nchevobbe, Assigned: ochameau)

Details

Attachments

(1 file)

evaluateJSAsync threw an exception: Error: Encountered error while waiting for Helper Result: Error: '' is not a valid command
createToken@resource://devtools/server/actors/webconsole/commands/parser.js:66:13
getCommandAndArgs@resource://devtools/server/actors/webconsole/commands/parser.js:45:45
evalWithDebugger@resource://devtools/server/actors/webconsole/eval-with-debugger.js:129:48
evaluateJS@resource://devtools/server/actors/webconsole.js:949:18

we can probably tweak the isCommand method so it won't match empty ":"

https://searchfox.org/mozilla-central/rev/ffdc4971dc18e1141cb2a90c2b0b776365650270/devtools/server/actors/webconsole/commands/parser.js#18,214-216

const COMMAND_PREFIX = /^:/;
...
function isCommand(string) {
  return COMMAND_PREFIX.test(string);
}
Assignee: nobody → poirot.alex
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c29477373c7
[devtools] Better handle exception while parsing console commands. r=devtools-reviewers,nchevobbe
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.