[Webkit-unassigned] [Bug 282130] New: Web Inspector: FR: Add eager evaluation in console
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 25 22:37:26 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=282130
Bug ID: 282130
Summary: Web Inspector: FR: Add eager evaluation in console
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Enhancement
Priority: P2
Component: Web Inspector
Assignee: webkit-unassigned at lists.webkit.org
Reporter: anon185441 at gmail.com
CC: inspector-bugzilla-changes at group.apple.com
"Eager evaluation" in this case means a little preview of the results of the expression as it is being typed, and an expansion of the autocompletion functionality to suggest results from this evaluation. Both FF and Chrome have this feature; when debugging an app that uses Electron on desktop but WebKit on iOS this is the largest disparity in terms of functionality, as it makes working with complex object structures a lot quicker and easier.
Internally, both browsers evaluate the code and terminate if it cannot be guaranteed that there are no side effects. This is done by maintaining a list of safe operations (property access, etc) under certain conditions (no proxies, etc), and some allowed builtins:
https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole/eager-ecma-allowlist.js
https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole/webidl-pure-allowlist.js
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/debug/debug-evaluate.cc;drc=7804fc4cc9837d70a6f52f7617612884cac261a5;l=537
Firefox uses the developer debugging functionality to step through the code and stop if disallowed code is reached: https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole/eval-with-debugger.js#434
Chrome implements it differently, implementing it as a feature in V8 that runs the code and throws an exception if disallowed code is reached.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241026/4d555b71/attachment.htm>
More information about the webkit-unassigned
mailing list