Closed
Bug 1847222
Opened 1 year ago
Closed 1 year ago
Always define bindings if disableBreaks is true
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(firefox118 fixed)
RESOLVED
FIXED
118 Branch
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
As discovered in bug 1842701 comment #26, some devtools internal methods relies on the extra bindings, such as copy
or $0
, but those bindings are not defined if there's conflicting global, which results in breaking the feature.
Those internal methods use options.disableBreaks
, and that can be used as condition to always define bindings even if there's conflicting bindings.
const res = await commands.scriptCommand.execute("copy(_self)", {
selectedObjectActor: actor,
disableBreaks: true,
});
const evalString = `{ let i = 0;
while (window.hasOwnProperty("temp" + i) && i < 1000) {
i++;
}
window["temp" + i] = $0;
"temp" + i;
}`;
...
const res = await this.toolbox.commands.scriptCommand.execute(evalString, {
selectedNodeActor: this.selection.nodeFront.actorID,
disableBreaks: true,
});
Comment 1•1 year ago
|
||
Most commands should be migrated to stop using evaluation, which is tracked in another bug
Severity: -- → S3
Flags: needinfo?(nchevobbe)
Priority: -- → P3
Comment 2•1 year ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #1)
Most commands should be migrated to stop using evaluation, which is tracked in another bug
Yes, that's Bug 1847219
Flags: needinfo?(nchevobbe)
Assignee | ||
Updated•1 year ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•1 year ago
|
||
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/5829fb3eba55
Always define bindings if options.disableBreaks is true. r=nchevobbe,devtools-reviewers
Comment 5•1 year ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox118:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•