From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- devtools/server/actors/utils/sources-manager.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'devtools/server/actors/utils/sources-manager.js') diff --git a/devtools/server/actors/utils/sources-manager.js b/devtools/server/actors/utils/sources-manager.js index b80da69bfa..fda37a3184 100644 --- a/devtools/server/actors/utils/sources-manager.js +++ b/devtools/server/actors/utils/sources-manager.js @@ -341,8 +341,13 @@ class SourcesManager extends EventEmitter { return this.blackBoxedSources.set(url, ranges); } + /** + * List all currently registered source actors. + * + * @return Iterator + */ iter() { - return [...this._sourceActors.values()]; + return this._sourceActors.values(); } /** @@ -429,15 +434,15 @@ class SourcesManager extends EventEmitter { // Without this check, the cache may return stale data that doesn't match // the document shown in the browser. let loadFromCache = canUseCache; - if (canUseCache && this._thread._parent.browsingContext) { + if (canUseCache && this._thread.targetActor.browsingContext) { loadFromCache = !( - this._thread._parent.browsingContext.defaultLoadFlags === + this._thread.targetActor.browsingContext.defaultLoadFlags === Ci.nsIRequest.LOAD_BYPASS_CACHE ); } // Fetch the sources with the same principal as the original document - const win = this._thread._parent.window; + const win = this._thread.targetActor.window; let principal, cacheKey; // On xpcshell, we don't have a window but a Sandbox if (!isWorker && win instanceof Ci.nsIDOMWindow) { -- cgit v1.2.3