Closed
Bug 2047506
Opened 15 days ago
Closed 11 days ago
script.callFunction fails when moz:debugging is paused
Categories
(Remote Protocol :: WebDriver BiDi, defect)
Remote Protocol
WebDriver BiDi
Tracking
(firefox154 fixed)
RESOLVED
FIXED
154 Branch
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The current implementation for callFunction mixes objects originating from two distinct Debugger compartments: https://searchfox.org/firefox-main/rev/4524afcc186654ad357e48fec686249515860ac8/remote/shared/Realm.sys.mjs#341-351
const bindings = {
__bidi_args: this.#createDebuggerObject(args),
__bidi_this: this.#createDebuggerObject(thisParameter),
};
if (pausedDebuggerFrame) {
return pausedDebuggerFrame.evalWithBindings(expression, bindings, {
bypassCSP: true,
url: this.#window.document.baseURI,
});
}
pausedDebuggerFrame is using the debugger instance from the moz:debugging module, while #createDebuggerObject will use the debugger of the realm itself. We need different debuggers, however in this case we should create the "args" and "this" by reusing the same Debugger instance as the paused frame, meaning we probably need to expose the Debugger in addition to the pausedDebuggerFrame.
| Assignee | ||
Comment 1•14 days ago
|
||
Updated•14 days ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Updated•14 days ago
|
Attachment #9598003 -
Attachment description: Bug 2047506 - [bidi] Fix callFunction when paused on a debugger frame → Bug 2047506 - [bidi] Fix script.callFunction to use correct Debugger context when paused
Pushed by jdescottes@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/1b1b47af7339
https://hg.mozilla.org/integration/autoland/rev/f74f2bce8fe0
[bidi] Fix script.callFunction to use correct Debugger context when paused r=Sasha
Comment 3•11 days ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
status-firefox154:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•