Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary: Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab, we should rename this method to what it does now. It mostly call attach requests of the target actor and its child console actor. It also "connect" the webextension target actor, but I would like to eventually move that outside of TabTarget.attach, like makeRemote. Depends On D4078 Reviewers: yulia! Tags: #secure-revision Bug #: 1485676 Differential Revision: https://phabricator.services.mozilla.com/D6161 MozReview-Commit-ID: KmFi1LIUBga
This commit is contained in:
@@ -110,11 +110,11 @@ const knownFronts = new WeakMap();
|
||||
|
||||
/**
|
||||
* Create a CSSUsageFront only when needed (returns a promise)
|
||||
* For notes on target.makeRemote(), see
|
||||
* For notes on target.attach(), see
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=1016330#c7
|
||||
*/
|
||||
exports.getUsage = function(trgt) {
|
||||
return trgt.makeRemote().then(() => {
|
||||
return trgt.attach().then(() => {
|
||||
let front = knownFronts.get(trgt.client);
|
||||
if (front == null && trgt.form.cssUsageActor != null) {
|
||||
front = new CSSUsageFront(trgt.client, trgt.form);
|
||||
|
||||
Reference in New Issue
Block a user