Closed Bug 1444081 Opened 7 years ago Closed 7 years ago

mozjs Rust binding is leaking a JSRuntime.

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

The current mozjs binding is leaking the top-level JSRuntime, which causes problems when running clean-up assertions at the destruction time of global static variables, such as js::ProtectedRegionTree::~ProtectedRegionTree.
This patch create a blocking sender which is used to signal when the Parent thread should shutdown the Parent runtime, and to signal back when we can resume the execution in the thread which triggered the shutdown signal. We need the thread which triggered the shutdown signal to be waiting for the shutdown to prevent the execution of static variables destructors before the shutdown of the Parent runtime.
Attachment #8957152 - Flags: review?(nfitzgerald)
Comment on attachment 8957152 [details] [diff] [review] Shutdown the Parent JSRuntime instead of leaking it. Review of attachment 8957152 [details] [diff] [review]: ----------------------------------------------------------------- Nice!
Attachment #8957152 - Flags: review?(nfitzgerald) → review+
Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/018578db0224 Shutdown the Parent JSRuntime instead of leaking it. r=fitzgen
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: