Closed Bug 1807896 Opened 1 year ago Closed 1 year ago

Reducer number of events between parent process code and soon-to-be privileged content proces toolbox

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Summary: Reducer number of events between parent process code and soon-to-be toolbox → Reducer number of events between parent process code and soon-to-be privileged content proces toolbox

This toolbox-unload was only fired for ToolboxHostManager own usage.
On top of that, ToolBoxHostManager was delaying its destruction by an additional
event loop. It indicates that this toolbox-unload event was too early.
So it rather makes sense to use the latest event in the destruction codepath.
i.e. toolbox's "destroyed" event.

I kept the event loop tick as toolbox-destroyed is still slightly too early.
The debugger is still going through pending async work in browser_dbg-breakpoints-in-evaled-sources.js.
This relates to the promise middleware which delay each promise action
by an event loop tick using setTimeout. setTimeout throws once we remove the host iframe.

I first tried to remove this event loop tick.
It highlighted two possible intermittents in two tests involving viewSourceInDebugger.
These tests weren't waiting for the full processing of opened sources by the Debugger frontend.
Using debugger shared-head helpers ensure waiting for full source selection.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

This event was only used in this test.

Unfortunately, I wasn't able to keep the same logic in the test while keeping it reliable.
I prefer to remove this test-only event and simplify the test to only ensure
we safely ignore subsequent calls to toggle.

What is hard to know from the test, when calling toggle in some following event loops
is if this will be ignored -or- close/open a toolbox...

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ddfebd080fb
[devtools] Move manager destruction from toolbox-unload to destroyed. r=devtools-reviewers,bomsy
https://hg.mozilla.org/integration/autoland/rev/9e752ce5baed
[devtools] Remove "toolbox-created" event. r=devtools-reviewers,perftest-reviewers,sparky,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: