forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1536888 - Move the remote agent to a JSM. r=ato
This will later help register the component statically in bug 1536862. And already ease using the remote agent from other JSM files. Differential Revision: https://phabricator.services.mozilla.com/D24227
- Loading branch information
Showing
10 changed files
with
60 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
component {8f685a9d-8181-46d6-a71d-869289099c6d} RemoteAgent.js | ||
component {8f685a9d-8181-46d6-a71d-869289099c6d} command-line-handler.js | ||
contract @mozilla.org/remote/agent {8f685a9d-8181-46d6-a71d-869289099c6d} | ||
category command-line-handler m-remote @mozilla.org/remote/agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
"use strict"; | ||
|
||
// Stopgap module until we can land bug 1536862 and remove this temporary file | ||
|
||
const {RemoteAgent} = ChromeUtils.import("chrome://remote/content/RemoteAgent.jsm"); | ||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); | ||
|
||
const RemoteAgentFactory = { | ||
createInstance(outer, iid) { | ||
if (outer) { | ||
throw Cr.NS_ERROR_NO_AGGREGATION; | ||
} | ||
|
||
return RemoteAgent.QueryInterface(iid); | ||
}, | ||
}; | ||
|
||
function RemoteAgentComponent() {} | ||
|
||
RemoteAgentComponent.prototype = { | ||
classDescription: "Remote Agent", | ||
classID: Components.ID("{8f685a9d-8181-46d6-a71d-869289099c6d}"), | ||
contractID: "@mozilla.org/remote/agent", | ||
_xpcom_factory: RemoteAgentFactory, /* eslint-disable-line */ | ||
}; | ||
|
||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RemoteAgentComponent]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters