This method was directly using the main target console front
to evaluate something, which could cause issue in a fission
world.
The function is moved to the WebConsole class, and calls commands
evaluateJSAsync, in which we retrieve the appropriate front
given the given options object (e.g. if there's a selecteObjectActor,
we'll talk to the target that hold the actor).
Differential Revision: https://phabricator.services.mozilla.com/D55986
The webconsole actor now has an associated front for some
time, but the naming of variables and properties didn't
reflect that (most weren't updated and were still calling
it a client).
This patch tries to rename all those variables so it's more
obvious we're dealing with an actual front.
Differential Revision: https://phabricator.services.mozilla.com/D49401
The DataProvider is what allows us to use the Netmonitor
components. The way it was created before was non optimal,
as it were inside an enhancer, and was then attached to
a proxy.
As we may now have multiple proxies, this could cause
some issue.
So we take this as an opportunity to create the DataProvider
in the WebConsoleWrapper (where live the actions we need for
the provider), and remove the now unused function on the
WebConsoleConnectionProxy.
Differential Revision: https://phabricator.services.mozilla.com/D41354
When opening the Browser Console, if the browser toolbox fission pref
is enabled, we create a WebConsoleConnectionProxy for each process.
This allow us to not start the ContentProcessMessages listener (that
uses ContentProcessMessagesForward), but directly connect to the content
process, to get fully inspectable console message, from the Browser Console.
We keep the this.proxy reference in WebConsoleUI to represent the "main" target
proxy, and we add an `additionalProxies` property that represent proxies
for other targets we connect to (e.g. content process targets).
We then have a function to list all the proxies we're handling, in order to
be able to do tasks on all of them (e.g. clearing cache, network message, ...)
We also take this as an opportunity to add a `evaluateJSAsync` at the
WebConsoleUI level so callsites don't retrieve the proxy.webConsoleClient
themselves.
Differential Revision: https://phabricator.services.mozilla.com/D40786
Since we modified the Editor to be accessible, we got
the green light to remove the old JsTerm code.
This means we can remove the preference for the codeMirror
input, and clean the WebConsole react app a bit.
This also mean we can avoid running a lot of our tests
twice.
Finally, some test helpers had to take argument with
specific shape to work against old jsterm (e.g. checkInputCompletionValue),
that we can now remove to make tests easier to read.
Differential Revision: https://phabricator.services.mozilla.com/D40172
JSTerm `execute` function is renamed to `_execute` to emphasize
that it's a private function.
A `dispatchEvaluateExpression` is added to the WebConsoleWrapper
so other panels can use that if they need to.
A test helper is added to be able to evaluate without grabbing
the jsterm reference, and tests are modified to use the new
helper, or the existing `executeAndWaitForMessage`.
Differential Revision: https://phabricator.services.mozilla.com/D39024
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.
Differential Revision: https://phabricator.services.mozilla.com/D39022
JSTerm `execute` function is renamed to `_execute` to emphasize
that it's a private function.
A `dispatchEvaluateExpression` is added to the WebConsoleWrapper
so other panels can use that if they need to.
A test helper is added to be able to evaluate without grabbing
the jsterm reference, and tests are modified to use the new
helper, or the existing `executeAndWaitForMessage`.
Differential Revision: https://phabricator.services.mozilla.com/D39024
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.
Differential Revision: https://phabricator.services.mozilla.com/D39022
The code callng action.updateRequest, in FirefoxDataProvider, expects the updateRequest action
to be processed once the returned promise is resolved. Otherwise it may spawn
duplicated requestData requests.
Differential Revision: https://phabricator.services.mozilla.com/D39153