diff --git a/devtools/client/netmonitor/src/connector/index.js b/devtools/client/netmonitor/src/connector/index.js index c59fddf5180b..17218e5ab1a0 100644 --- a/devtools/client/netmonitor/src/connector/index.js +++ b/devtools/client/netmonitor/src/connector/index.js @@ -39,7 +39,6 @@ class Connector { this.navigate = this.navigate.bind(this); this.sendHTTPRequest = this.sendHTTPRequest.bind(this); this.triggerActivity = this.triggerActivity.bind(this); - this.getTabTarget = this.getTabTarget.bind(this); this.viewSourceInDebugger = this.viewSourceInDebugger.bind(this); this.requestData = this.requestData.bind(this); this.getTimingMarker = this.getTimingMarker.bind(this); @@ -480,14 +479,6 @@ class Connector { return this.dataProvider.getLongString(stringGrip); } - /** - * Getter that access tab target instance. - * @return {object} browser tab target instance - */ - getTabTarget() { - return this.currentTarget; - } - /** * Getter that returns the current toolbox instance. * @return {Toolbox} toolbox instance diff --git a/devtools/client/netmonitor/src/har/har-automation.js b/devtools/client/netmonitor/src/har/har-automation.js index 791847df884a..b3c4153d1ef8 100644 --- a/devtools/client/netmonitor/src/har/har-automation.js +++ b/devtools/client/netmonitor/src/har/har-automation.js @@ -235,8 +235,7 @@ function getDefaultTargetFile(options) { Services.prefs.getCharPref("devtools.netmonitor.har.defaultLogDir"); const folder = HarUtils.getLocalDirectory(path); - const tabTarget = options.connector.getTabTarget(); - const host = new URL(tabTarget.url); + const host = new URL(options.connector.currentTarget.url); const fileName = HarUtils.getHarFileName( options.defaultFileName, options.jsonp, diff --git a/devtools/client/netmonitor/src/har/har-exporter.js b/devtools/client/netmonitor/src/har/har-exporter.js index 3e652048b956..eea44f6054e4 100644 --- a/devtools/client/netmonitor/src/har/har-exporter.js +++ b/devtools/client/netmonitor/src/har/har-exporter.js @@ -78,8 +78,7 @@ const HarExporter = { let data = await this.fetchHarData(options); - const tabTarget = options.connector.getTabTarget(); - const host = new URL(tabTarget.url); + const host = new URL(options.connector.currentTarget.url); const fileName = HarUtils.getHarFileName( defaultFileName, @@ -193,15 +192,13 @@ const HarExporter = { */ async buildHarData(options) { const { connector } = options; - const { getTabTarget } = connector; - const { title } = getTabTarget(); // Disconnect from redux actions/store. connector.enableActions(false); options = { ...options, - title, + title: connector.currentTarget.title, getString: connector.getLongString, getTimingMarker: connector.getTimingMarker, requestData: connector.requestData, diff --git a/devtools/client/webconsole/components/Output/message-types/NetworkEventMessage.js b/devtools/client/webconsole/components/Output/message-types/NetworkEventMessage.js index 2ecb4e41559c..24232610c6a1 100644 --- a/devtools/client/webconsole/components/Output/message-types/NetworkEventMessage.js +++ b/devtools/client/webconsole/components/Output/message-types/NetworkEventMessage.js @@ -179,7 +179,6 @@ function NetworkEventMessage({ getLongString: grip => { return serviceContainer.getLongString(grip); }, - getTabTarget: () => {}, sendHTTPRequest: () => {}, triggerActivity: () => {}, requestData: (requestId, dataType) => {