summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/utils/sources-manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/utils/sources-manager.js')
-rw-r--r--devtools/server/actors/utils/sources-manager.js13
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) {