Add an assertion to ensure gDevTools is loaded only once
Categories
(DevTools :: General, task)
Tracking
(firefox111 fixed)
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.
Assignee | ||
Comment 1•1 year ago
|
||
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.
Updated•1 year ago
|
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
Comment 3•1 year ago
•
|
||
Backed out for causing multiple failures.
Most of the failures are on devtools tests but there are also on browser-chrome.
- Failure log for bc with failure line: TEST-UNEXPECTED-FAIL | browser/modules/test/browser/browser_UsageTelemetry_interaction.js | Uncaught exception in test - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:729 - TypeError: can't access property "getBoundingClientRect", aTarget is null
- Failure log for bc with failure line: TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_addon_debugging_netmonitor.js | Exception thrown - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
- Failure log for bc with failure line: TEST-UNEXPECTED-FAIL | toolkit/mozapps/extensions/test/browser/browser_about_debugging_link.js | uncaught exception - Error: This module should be loaded in the parent process only, in the shared global. at DevTools@resource://devtools/client/framework/devtools.js:91:11
Devtools failures: - Failure log for TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_enable_devtools_popup_devtools_user.js | head.js import threw an exception - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
- Failure log for TEST-UNEXPECTED-FAIL | devtools/client/netmonitor/test/browser_net-ws-filter-freetext.js | head.js import threw an exception - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
- Failure log for TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_add-property-and-reselect.js | head.js import threw an exception - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
- Failure log for TEST-UNEXPECTED-FAIL | devtools/client/storage/test/browser_storage_basic.js | head.js import threw an exception - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
- Failure log for TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-async-stepping.js | head.js import threw an exception - at resource://devtools/client/framework/devtools.js:91 - Error: This module should be loaded in the parent process only, in the shared global.
and many more.
Please take a look at this push to see the other failures that are fixed by this commit d70b1ca0040fc907dd0d4c8ed221a15bd8684091 .
LATER EDIT: there also xpchsell failures and mochitest-chrome failures(also available to see in the link that I provided above).
Assignee | ||
Comment 4•1 year ago
|
||
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.
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
Comment 6•1 year ago
|
||
bugherder |
Description
•