Allow the context menu to interact with targets
Categories
(DevTools :: Console, task, P1)
Tracking
(firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 2 open bugs)
Details
(Whiteboard: dt-fission-m1)
Attachments
(1 file, 1 obsolete file)
Some context menu entry (e.g. Copy Object
), may need to talk to a specific target to achieve their goal. Let's make sure the context menu can interact with targets.
(Might be covered by Bug 1567836)
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
In the case of Copy Object
, this is definitely biting us.
What's done is that from the context menu, we request an evaluation to the server, with:
webConsoleUI.evaluateJSAsync("copy(_self)", {
selectedObjectActor: actor,
})
where actor
is an actorID.
Then on the server, we have some magic to replace the _self
part to the value of selectedObjectActor
.
But now, since evaluateJSAsync
uses the top-level proxy, the server function can't retrieve the actor, and the function fails.
In such case, we should request the evaluation on the right target, which means we need to have a way to know from which proxy the message was added.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Progress
- this patch gets storeAsGlobal to evaluate in the correct thread
- we will need to file a follow up bug for using the selected thread for general evaluations
Assignee | ||
Comment 4•5 years ago
|
||
To be clear, I think this patch should be done in M1, but it should only allow the client to talk to the right target, that's all (so copy object would work, store as global variable would create the variable in the right context).
Any further interaction that would be needed from a user point of view (e.g. switching to said target when the user stored an object as a global variable), will be handled as part of the context switching project.
This still relies on Bug 1579090.
Jason if you want I can take over since there's still some unassigned debugger bugs for M1.
Comment 5•5 years ago
|
||
Thanks. I think you have a clearer idea of what needs to be done.
Assignee | ||
Comment 7•5 years ago
|
||
When the selectedObjectActor options is passed to the evaluateJSAsync
command in the console, we now try to retrieve the corresponding console
front to send the request to the correct target.
This makes the "Copy Object" context menu entry works in the Browser Console
on content objects.
A test is added to ensure this works as expected.
Depends on D54513
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b459def3e08 Use ad-hoc console front for calls to evaluateJSAsync with selectedObjectActor. r=jdescottes.
Comment 9•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Description
•