Closed
Bug 1780158
Opened 2 years ago
Closed 2 years ago
Exclude JSOp::SetAliasedVar ".generator" from Debugger.Script.getEffectfulOffsets
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
104 Branch
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | unaffected |
firefox102 | --- | unaffected |
firefox103 | --- | unaffected |
firefox104 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
The following code expects setBreakpoint
doesn't throw, but bug 1776376 changed the behavior and now it can throw.
const offsets = script.getEffectfulOffsets();
for (const offset of offsets) {
script.setBreakpoint(offset, handler);
}
The issue here is the following:
- Bug 1776376 patch wants to hide the
JSOp::SetAliasedVar ".generator"
from consumer getEffectfulOffsets
doesn't hide it because it thinks the instruction is effectful
Then, JSOp::SetAliasedVar ".generator"
isn't actually "effectful" in term of getEffectfulOffsets
method's definition.
### `getEffectfulOffsets()`
**If the instance refers to a `JSScript`**, return an array
containing the offsets of all bytecodes in the script which can have direct
side effects that are visible outside the currently executing frame. This
includes, for example, operations that set properties or elements on
objects, or that may set names in environments created outside the frame.
JSOp::SetAliasedVar ".generator"
sets engine-internal variable, and it's not visible outside the frame.
We can change getEffectfulOffsets
not to return the JSOp::SetAliasedVar ".generator"
, so that the above code in devtools keeps working.
Comment 1•2 years ago
|
||
Set release status flags based on info from the regressing bug 1776376
status-firefox102:
--- → unaffected
status-firefox103:
--- → unaffected
status-firefox104:
--- → affected
status-firefox-esr102:
--- → unaffected
status-firefox-esr91:
--- → unaffected
Assignee | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Type: task → defect
Updated•2 years ago
|
Keywords: regression
Updated•2 years ago
|
Severity: -- → N/A
Priority: -- → P1
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/bbe1d96dc63d Exclude JSOp::SetAliasedVar .generator from Debugger.Script.getEffectfulOffsets. r=mgaudet
Comment 5•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•