Bug 1831373 - [remote] Fix sendRootCommand trying to reach root-in-windowglobal layer r=webdriver-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D177179
This commit is contained in:
Julian Descottes 2023-05-05 13:38:20 +00:00
parent cdababa868
commit d74e496f4b

View File

@ -10,6 +10,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
getMessageHandlerClass:
"chrome://remote/content/shared/messagehandler/MessageHandlerRegistry.sys.mjs",
Log: "chrome://remote/content/shared/Log.sys.mjs",
RootMessageHandler:
"chrome://remote/content/shared/messagehandler/RootMessageHandler.sys.mjs",
});
const protocols = {
@ -198,7 +200,7 @@ export class ModuleCache {
// normally be "if the destination has a higher level than the origin, just
// use the destination as target folder", but as we don't support other
// levels than root & windowglobal, we can simplify this to this for now.
if (destinationType === "root") {
if (destinationType === lazy.RootMessageHandler.type) {
return "root";
}