Closed Bug 606057 Opened 15 years ago Closed 11 years ago

Add asserts that make sure that only one thread is currently associated with any compartment

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status2.0 --- wanted

People

(Reporter: gal, Unassigned)

References

Details

This might be tricky due to cx->globalObject and SetGlobalObject pre-associating a context with a compartment, so we might have to remove cx->globalObject first.
Blocks: compartmentGC
No longer blocks: 558861
No longer depends on: compartmentGC
Blocks: 606059
No longer blocks: 606059
Do you mean only one context at any given time? If so, we could add an API like the one for contexts JS_ClearCompartmentThread and then associate compartments with null threads with the current thread and assert if a compartment with a non-null thread is used on a different thread. For posterity: currently, worker threads bounce compartments and contexts around on many different threads, but maintain the invariant that only one thread has control of any compartment or context at any given time.
No, I mean thread.
blocking2.0: ? → beta8+
blocking2.0: beta8+ → beta9+
No longer have to block on this. We will force all threads to synchronize even if we only GC a single compartment.
blocking2.0: beta9+ → ---
status2.0: --- → wanted
Blocks: 616927
No longer blocks: compartmentGC
Assignee: general → nobody
With ExclusiveContext we now have this.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.