summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/utils/sources-manager.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /devtools/server/actors/utils/sources-manager.js
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
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.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/devtools/server/actors/utils/sources-manager.js b/devtools/server/actors/utils/sources-manager.js
index fda37a3184..981a7c8213 100644
--- a/devtools/server/actors/utils/sources-manager.js
+++ b/devtools/server/actors/utils/sources-manager.js
@@ -101,7 +101,8 @@ class SourcesManager extends EventEmitter {
this._thread.threadLifetimePool.manage(actor);
this._sourceActors.set(source, actor);
- if (this._sourcesByInternalSourceId && source.id) {
+ // source.id can be 0 for WASM sources
+ if (this._sourcesByInternalSourceId && Number.isInteger(source.id)) {
this._sourcesByInternalSourceId.set(source.id, source);
}
@@ -157,7 +158,8 @@ class SourcesManager extends EventEmitter {
if (!this._sourcesByInternalSourceId) {
this._sourcesByInternalSourceId = new Map();
for (const source of this._thread.dbg.findSources()) {
- if (source.id) {
+ // source.id can be 0 for WASM sources
+ if (Number.isInteger(source.id)) {
this._sourcesByInternalSourceId.set(source.id, source);
}
}