Commit Graph
14 Commits
Author SHA1 Message Date
Julian Descottes 1fc708e1f7 Bug 1911382 - [remote] Reduce logs for MessageHandler module system r=webdriver-reviewers,whimboo
Removing those 2 logs by default reduces the log size of the pup wd job significantly (320K lines -> 200K lines)

Differential Revision: https://phabricator.services.mozilla.com/D218777
2024-08-09 15:00:30 +00:00
Gregory Pappas e9950eccfd Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Micky ae96cf0d58 Bug 1838149 - [remote] Use ".sys.mjs" to reference other ESM modules in ModuleCache.sys.mjs r=webdriver-reviewers,whimboo DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D182224
2023-06-28 07:19:54 +00:00
scottlynotlie 0b60d9631f Bug 1788013 - changed hasModule to hasModuleClass r=jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D179128
2023-05-26 21:47:28 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Julian Descottes fde76d7e3e Bug 1831411 - [remote] Commands send to root modules from windowglobal should run in the parent r=webdriver-reviewers,Sasha
Depends on D177181

Quick summary:

Handling a command is mostly done in 2 steps
- first check if there is a module in the current layer which matches the command
- if yes: send the command to this module, if no: try to forward the command (using forwardCommand which has different implementations for each message handler)

The initial patch to allow windowglobal -> root communication was flawed, because it updated the ModuleCache to return "root" modules when the destination was of type ROOT. However that's not how MessageHandler modules are supposed to work. The ModuleCache should only ever return modules which can be loaded in the current "layer". So if we are in a windowglobal ModuleCache, we should never return a "root" module.

Instead the ModuleCache should return (and store) `null` for this load attempt, so that the MessageHandler can go to the `forwardCommand` step.
So here I slightly changed the ModuleCache implementation to have a single `#getModuleClass` private helper, which can quickly check if we are in a "not root" -> "root" scenario and just return null early.

Follow up: I think some of the logic currently kept in the module cache should move to the MessageHandler, and the ModuleCache should only care about caching module classes/instances. All the destination-to-folder logic is really tied to handling commands, so that should be done by the base MessageHandler class. Or at least it should be closer to the `handleCommand` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D177202
2023-05-05 13:38:21 +00:00
Julian Descottes 1bc83e000b Bug 1831373 - [remote] Remove all logic from ModuleRegistry classes r=webdriver-reviewers,whimboo
Depends on D177180

Differential Revision: https://phabricator.services.mozilla.com/D177181
2023-05-05 13:38:21 +00:00
Julian Descottes a8be54ff9b Bug 1831373 - [remote] Fix sendRootCommand trying to reach root-in-windowglobal layer r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D177179
2023-05-05 13:38:20 +00:00
Julian Descottes 3638d48b3b Bug 1830404 - [remote] Support sending message handler commands from windowglobal to root r=webdriver-reviewers,whimboo
Depends on D176713

Differential Revision: https://phabricator.services.mozilla.com/D176714
2023-05-02 20:11:50 +00:00
Julian Descottes 1a24137dc8 Bug 1826366 - [remote] Manual fixes for valid-jsdoc in remote r=webdriver-reviewers,whimboo
Depends on D174738

Differential Revision: https://phabricator.services.mozilla.com/D174739
2023-04-05 16:25:48 +00:00
Julian Descottes 86c898746c Bug 1826366 - [remote] Apply lint --fix for valid-jsdoc in remote r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D174738
2023-04-05 16:25:47 +00:00
Julian Descottes a5d2e3d5ff Bug 1790472 - [bidi] Convert /remote/webdriver-bidi JSM modules to ESM r=webdriver-reviewers,whimboo
Depends on D158296

Differential Revision: https://phabricator.services.mozilla.com/D158297
2022-09-30 11:08:08 +00:00
Julian Descottes 6f7e347cec Bug 1790468 - [remote] Convert /remote/shared JSM modules to ESM r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D158293
2022-09-30 11:08:06 +00:00