Closed Bug 1534776 Opened 1 year ago Closed 1 year ago

Don't leak the world if the JS shell's main() function exits early

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(2 files)

While making some minor change recently, I found that if main() returns early for any reason, the engine complains loudly about our having leaked the world.

It's easy enough to make this never happen, just a few ScopeExits. I think.

This changes the order of some cleanup operations, harmlessly, to make
initialization and teardown more FIFO.

Priority: -- → P3
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/57833afcf11d
Don't leak the world if the shell's main() exits early. r=jwalden
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Reopening because I missed a review comment.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0817477e4595
Part 2: Make a captured local variable `const`, per a review comment. r=jwalden
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.