Commit Graph
9 Commits
Author SHA1 Message Date
Alexandre Poirot 2f676c75ba Bug 1876297 - [devtools] Only force overiding local scope variables for frontend commands relying on console commands. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
We should probably expose new RDP methods to prevent relying on console evaluations for this.
We would still have some potential issues if the evaluated method is about a JS symbol
whose name is the console command.

Differential Revision: https://phabricator.services.mozilla.com/D200167
2024-02-02 12:41:00 +00:00
Alexandre Poirot 70f3c31950 Bug 1835629 - [devtools] Prevent pausing and showing source of any internal devtools evaluation. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This aligns all features in DevTools frontend currently evaluating some JavaScript code:
console input, eager evaluation, watch expression, log breakpoint, conditional breakpoint, inline preview, preview tooltips,
console "store as global", inspector "store as temp variable", DOM panel "window" retrieval,...

Except the console evaluation input, none of the many features evaluating code should:
* trigger any type of breakpoint via the evaluated code,
* evaluated sources should not be shown in the debugger.

This has been done by adding a `disableBreaks` argument to the web console actor evaluation method.
This mimic CDP's existing argument and disable trigerring any type of breakpoint,
while also avoiding instantiating Debugger.Source for the evaluated source.

Differential Revision: https://phabricator.services.mozilla.com/D180094
2023-06-29 19:41:46 +00:00
Alexandre Poirot 07e6ce0083 Bug 1792848 - [devtools] Use absolute URLs to import modules in devtools/shared. r=Honza,devtools-backward-compat-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D158643
2022-10-12 15:56:22 +00:00
Alexandre Poirot 19baca5a9b Bug 1571708 - [devtools] Inline WebConsoleUI.getWebconsoleFront into autocomplete code. r=jdescottes
This was the only callsite.
I also aligned to what was done in ScriptCommand.execute, which is the reference.

Differential Revision: https://phabricator.services.mozilla.com/D143040
2022-04-11 11:07:56 +00:00
Nicolas Chevobbe 615c42c826 Bug 1730148 - [devtools] Handle onTargetSelected in DOM panel. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D130332
2021-11-10 14:51:05 +00:00
Cristian Tuns f0b1f0f677 Backed out 5 changesets (bug 1738915, bug 1739061, bug 1730148) for causing mochitest failures on browser_resources_document_events.js CLOSED TREE DONTBUILD
Backed out changeset 24c1a120bb77 (bug 1739061)
Backed out changeset eb9953fd3252 (bug 1738915)
Backed out changeset 9bd72db885eb (bug 1730148)
Backed out changeset 819078e24fa6 (bug 1730148)
Backed out changeset a0e706688adc (bug 1730148)
2021-11-10 07:07:57 -05:00
Nicolas Chevobbe 1c6908d31f Bug 1730148 - [devtools] Handle onTargetSelected in DOM panel. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D130332
2021-11-10 10:44:51 +00:00
Nicolas Chevobbe 47081cbc29 Bug 1712739 - [devtools] Fold custom WebConsoleFront#evaluateJSAsync method into scriptCommand#execute. r=ochameau.
Tests that were using `evaluateJSAsync` are updated, either by using the new command,
or by awaiting for the `evaluationResult` event.
A couple chrome tests were moved to devtools/shared/commands/js/tests/ and turned
into browser tests, and some of them were completely removed as we tested the
features in mochitests as well.

Differential Revision: https://phabricator.services.mozilla.com/D116248
2021-06-02 13:15:06 +00:00
Nicolas Chevobbe 51ae13fc7b Bug 1712739 - [devtools] Add a script command with an execute method. r=jdescottes.
This method is meant to replace the direct usage
of webconsoleFront.evaluateJSAsync.
The WebConsoleCommands file is removed, and all
client calls to evaluateJSAsync are migrated to
the new method. Callsites are simplified when
possible, and some test are refactored to switch
to spawned task to retrieve content page information.

Differential Revision: https://phabricator.services.mozilla.com/D116242
2021-06-02 13:15:06 +00:00