Both of these failures are the same more source, though I don't totally understand what is introducing the difference. > Debugger.Source belongs to a different Debugger is the core error. > query object's 'source' property is not undefined nor a Debugger.Source object Is actually happening because `source` is a `Proxy` wrapping the `Debugger.Source` object. I have no idea where the proxy is coming from, but either way they are both caused because we are initializing a source actor with a value that isn't right. The issue is that https://bugzilla.mozilla.org/show_bug.cgi?id=1531826 introduced a call ``` const actor = this.targetActor.sources.getOrCreateSourceActor(script.source); ``` but `script.source` in this context is a `Debugger.Script` owned by the _local_ `dbg` object created by `devtools/server/actors/inspector/event-collector.js` rather than the `Debugger` instance created by the thread actor itself, thus resulting in `Debugger.Source belongs to a different Debugger`. We realistically shouldn't be reaching across that boundary by mixing `Debugger.Source` objects from multiple debugger instances. Brian, could you look into alternative approaches to https://bugzilla.mozilla.org/show_bug.cgi?id=1531826 that might avoid this? Maybe we need a utility somewhere to adopt a Debugger.Source into a new Debugger that is debugging the same source, the same way it currently exposes `adoptDebuggeeValue`?
Bug 1536618 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Both of these failures are the same more source, though I don't totally understand what is introducing the difference. > Debugger.Source belongs to a different Debugger is the core error. > query object's 'source' property is not undefined nor a Debugger.Source object Is actually happening because `source` is a `Proxy` wrapping the `Debugger.Source` object. I have no idea where the proxy is coming from, but either way they are both caused because we are initializing a source actor with a value that isn't right. The issue is that https://bugzilla.mozilla.org/show_bug.cgi?id=1531826 introduced a call ``` const actor = this.targetActor.sources.getOrCreateSourceActor(script.source); ``` but `script.source` in this context is a `Debugger.Source` owned by the _local_ `dbg` object created by `devtools/server/actors/inspector/event-collector.js` rather than the `Debugger` instance created by the thread actor itself, thus resulting in `Debugger.Source belongs to a different Debugger`. We realistically shouldn't be reaching across that boundary by mixing `Debugger.Source` objects from multiple debugger instances. Brian, could you look into alternative approaches to https://bugzilla.mozilla.org/show_bug.cgi?id=1531826 that might avoid this? Maybe we need a utility somewhere to adopt a Debugger.Source into a new Debugger that is debugging the same source, the same way it currently exposes `adoptDebuggeeValue`?