Closed Bug 1808797 Opened 1 year ago Closed 1 year ago

Add an assertion to ensure gDevTools is loaded only once

Categories

(DevTools :: General, task)

task

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file)

Bug 1806778 highlighted that we could easily spawn more than one instance of gDevTools.
This was unnoticed and lead to various not-so-easy-to-understand bugs.

It would be nice if we had assertion warning explicitely if we start loading this module more than one, from unexpected contexts.

The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/184e7ccf3c01
[devtools] Add assertion to verify gDevTools is loaded only once. r=jdescottes

Backed out for causing multiple failures.
Most of the failures are on devtools tests but there are also on browser-chrome.

Push with failures

Backout link

LATER EDIT: there also xpchsell failures and mochitest-chrome failures(also available to see in the link that I provided above).

Flags: needinfo?(poirot.alex)

This is really surprising to see the assertion being fired from a couple of these tests...
And I do not reproduce them locally, let see if try highlights these exceptions:
https://treeherder.mozilla.org/jobs?repo=try&revision=2c464bcf68d338a51a7cbab26ea71978f18958b6
I'm wondering if that was interferences from bug 1810009.

Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2e48991b3989
[devtools] Add assertion to verify gDevTools is loaded only once. r=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: