Closed Bug 1602489 Opened 7 months ago Closed 7 months ago

Basic eager evaluation support

Categories

(DevTools :: Console, enhancement)

enhancement
Not set
normal

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The soon-to-be-attached patch adds basic support for eager evaluation of the console's terminal input, when the devtools.webconsole.input.eagerEvaluation preference is set. When the text can be evaluated without side effects and returns or throws a non-undefined value, that value is converted to a string and shown underneath the terminal input. The string conversion happens both because it's easier and because showing a full object preview seems heavyweight here, though I could definitely be wrong about that. I'd like to get something basic in first so that we can try out the UX and see if there are any performance issues to look into. Otherwise, the main followups needed here are to use eager evaluation when doing autocomplete (bug 1580083) and add a whitelist for permitted native calls to make (right now we allow native getters to run, but nothing else).

Follow ups:

  1. backward compatibility
  2. use CodeMirror instance directly (lineWidget)
  3. throttle calls to the server
  4. top level await
  5. dont show syntax errors (chrome)
  6. hide display if the input is primitive
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f472871e7e4
Basic eager evaluation support, r=nchevobbe.
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73

Given that this isn't enabled anywhere yet (even in Nightly), and looks to be at a really early, rough stage, I don't think this is ready to document yet, so I'm removing the dev-doc-needed keyword.

When this is ready to document, please add dev-doc-needed to the relevant enabling bug. Thanks!

Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.