зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
This commit is contained in:
Родитель
b1bb3196f3
Коммит
1b2d2414ad
|
@ -206,7 +206,7 @@ Inspector.prototype = {
|
|||
// stylesheet resources before instanciating the inspector front since pageStyle
|
||||
// actor should refer the watcher.
|
||||
if (
|
||||
this.toolbox.resourceWatcher.hasWatcherSupport(
|
||||
this.toolbox.resourceWatcher.hasResourceWatcherSupport(
|
||||
this.toolbox.resourceWatcher.TYPES.STYLESHEET
|
||||
)
|
||||
) {
|
||||
|
|
|
@ -52,8 +52,8 @@ class FirefoxConnector {
|
|||
return this.toolbox.targetList.targetFront;
|
||||
}
|
||||
|
||||
get hasWatcherSupport() {
|
||||
return this.toolbox.resourceWatcher.hasWatcherSupport(
|
||||
get hasResourceWatcherSupport() {
|
||||
return this.toolbox.resourceWatcher.hasResourceWatcherSupport(
|
||||
this.toolbox.resourceWatcher.TYPES.NETWORK_EVENT
|
||||
);
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ class FirefoxConnector {
|
|||
* Get the list of blocked URLs
|
||||
*/
|
||||
async getBlockedUrls() {
|
||||
if (this.hasWatcherSupport && this.currentWatcher) {
|
||||
if (this.hasResourceWatcherSupport && this.currentWatcher) {
|
||||
const network = await this.currentWatcher.getNetworkActor();
|
||||
return network.getBlockedUrls();
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ class FirefoxConnector {
|
|||
* @param {object} urls An array of URL strings
|
||||
*/
|
||||
async setBlockedUrls(urls) {
|
||||
if (this.hasWatcherSupport && this.currentWatcher) {
|
||||
if (this.hasResourceWatcherSupport && this.currentWatcher) {
|
||||
const network = await this.currentWatcher.getNetworkActor();
|
||||
return network.setBlockedUrls(urls);
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ class FirefoxDataProvider {
|
|||
// Do a RDP request to fetch data from the actor.
|
||||
if (
|
||||
clientMethodName == "getStackTrace" &&
|
||||
this.resourceWatcher.hasWatcherSupport(
|
||||
this.resourceWatcher.hasResourceWatcherSupport(
|
||||
this.resourceWatcher.TYPES.NETWORK_EVENT_STACKTRACE
|
||||
)
|
||||
) {
|
||||
|
|
|
@ -290,7 +290,7 @@ class ResourceWatcher {
|
|||
// ...request existing resource and new one to come from this one target
|
||||
// *but* only do that for backward compat, where we don't have the watcher API
|
||||
// (See bug 1626647)
|
||||
if (this.hasWatcherSupport(resourceType)) {
|
||||
if (this.hasResourceWatcherSupport(resourceType)) {
|
||||
continue;
|
||||
}
|
||||
await this._watchResourcesForTarget(targetFront, resourceType);
|
||||
|
@ -611,7 +611,7 @@ class ResourceWatcher {
|
|||
);
|
||||
}
|
||||
|
||||
hasWatcherSupport(resourceType) {
|
||||
hasResourceWatcherSupport(resourceType) {
|
||||
return this.watcher?.traits?.resources?.[resourceType];
|
||||
}
|
||||
|
||||
|
@ -642,7 +642,7 @@ class ResourceWatcher {
|
|||
|
||||
// If the server supports the Watcher API and the Watcher supports
|
||||
// this resource type, use this API
|
||||
if (this.hasWatcherSupport(resourceType)) {
|
||||
if (this.hasResourceWatcherSupport(resourceType)) {
|
||||
await this.watcher.watchResources([resourceType]);
|
||||
return;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ class ResourceWatcher {
|
|||
|
||||
// If the server supports the Watcher API and the Watcher supports
|
||||
// this resource type, use this API
|
||||
if (this.hasWatcherSupport(resourceType)) {
|
||||
if (this.hasResourceWatcherSupport(resourceType)) {
|
||||
this.watcher.unwatchResources([resourceType]);
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче