diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /devtools/server/actors/utils/sources-manager.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/actors/utils/sources-manager.js')
-rw-r--r-- | devtools/server/actors/utils/sources-manager.js | 13 |
1 files changed, 9 insertions, 4 deletions
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<SourceActor> + */ 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) { |