forked from mirrors/gecko-dev
Bug 1788773 - [devtools] Define QueryInterface in class definition instead of constructor for network observer modules r=ochameau
Depends on D161690 Differential Revision: https://phabricator.services.mozilla.com/D161691
This commit is contained in:
parent
488833475a
commit
c527683d45
2 changed files with 12 additions and 12 deletions
|
|
@ -58,13 +58,6 @@ export class NetworkResponseListener {
|
|||
#wrappedNotificationCallbacks;
|
||||
|
||||
constructor(networkObserver, httpActivity, decodedCertificateCache) {
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
"nsIStreamListener",
|
||||
"nsIInputStreamCallback",
|
||||
"nsIRequestObserver",
|
||||
"nsIInterfaceRequestor",
|
||||
]);
|
||||
|
||||
// Explicit flag to check if this listener was already destroyed.
|
||||
this.#isDestroyed = false;
|
||||
|
||||
|
|
@ -602,4 +595,11 @@ export class NetworkResponseListener {
|
|||
this.#offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
QueryInterface = ChromeUtils.generateQI([
|
||||
"nsIStreamListener",
|
||||
"nsIInputStreamCallback",
|
||||
"nsIRequestObserver",
|
||||
"nsIInterfaceRequestor",
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,11 +48,6 @@ class NetworkThrottleListener {
|
|||
* which status changes should be reported
|
||||
*/
|
||||
constructor(queue) {
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
"nsIStreamListener",
|
||||
"nsIInterfaceRequestor",
|
||||
]);
|
||||
|
||||
this.#activities = {};
|
||||
this.#offset = 0;
|
||||
this.#pendingData = [];
|
||||
|
|
@ -273,6 +268,11 @@ class NetworkThrottleListener {
|
|||
this.#activities[code] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
QueryInterface = ChromeUtils.generateQI([
|
||||
"nsIStreamListener",
|
||||
"nsIInterfaceRequestor",
|
||||
]);
|
||||
}
|
||||
|
||||
class NetworkThrottleQueue {
|
||||
|
|
|
|||
Loading…
Reference in a new issue