Closed
Bug 1847222
Opened 3 years ago
Closed 3 years 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•3 years 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•3 years 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•3 years ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•3 years 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•3 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 years 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
•