Closed Bug 1653280 Opened 4 years ago Closed 4 years ago

`yield* allowContentIter(...)` not supported in self-hosted code

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: avandolder, Assigned: avandolder)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Changing the

for (const innerValue of allowContentIter(mapped)) {
  yield innerValue;
}

inner loop in Iterator.prototype.flatMap to

yield* allowContentIter(mapped);

then attempting to run the JS shell results in the following segfault:

Assertion failure: allowSelfHosted || emitterMode != BytecodeEmitter::SelfHosting (.close() on iterators is prohibited in self-hosted code because it can run user-modifiable iteration code), at /Users/avandolder/dev/mozilla-unified/js/src/frontend/BytecodeEmitter.cpp:2864
zsh: segmentation fault  ~/dev/mozilla-unified/build_DBG.OBJ/dist/bin/js --enable-iterator-helpers
```.
Severity: -- → S4
Type: defect → enhancement
Priority: -- → P1
Summary: `yield* allowContentIter(...)` in self-hosted code segfaults the JS shell → `yield* allowContentIter(...)` not supported in self-hosted code
Assignee: nobody → avandolder
Status: NEW → ASSIGNED
Pushed by avandolder@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de5ca91eef25
Support yield* in self-hosted code. r=jorendorff
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: