Closed Bug 675068 Opened 8 years ago Closed 8 years ago

change off-thread cycle collection to not use a safe JS context

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: luke, Assigned: luke)

References

Details

(Whiteboard: [inbound])

Attachments

(2 files)

Attached patch patchSplinter Review
When doing cycle-collection off the main thread, XPConnect calls GetSafeJSContext.  This creates a JSContext, associated with the main-thread JSRuntime, that is owned and later destroyed concurrently (when the cycle collection thread is destroyed).  This patch creates a special context to use just for cycle collection that gets destroyed on the main thread during shutdown.  This is enough to satisfy the asserts in bug 650411.  Later, (after we can assume single-threaded XPConnect) we can rip this out.
Attachment #549249 - Flags: review?(peterv)
Attachment #549249 - Flags: review?(mrbkap)
Blocks: 650411
Found this dead code while in the area.  Its nice not to have it since it makes it easier to reason about safe JS contexts.
Attachment #549935 - Flags: review?(mrbkap)
Attachment #549935 - Flags: review?(mrbkap) → review+
Attachment #549249 - Flags: review?(mrbkap) → review+
Comment on attachment 549249 [details] [diff] [review]
patch

One review is probably enough; also I think peterv's out.
Attachment #549249 - Flags: review?(peterv)
http://hg.mozilla.org/mozilla-central/rev/7046a39cf54d
http://hg.mozilla.org/mozilla-central/rev/4f64e4d6b56d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment on attachment 549249 [details] [diff] [review]
patch

Review of attachment 549249 [details] [diff] [review]:
-----------------------------------------------------------------

Fine by me.
Attachment #549249 - Flags: review+
You need to log in before you can comment on or make changes to this bug.