Closed Bug 891869 Opened 12 years ago Closed 9 years ago

Unify thingGCRooters between PerThreadData and ContextFriendFields so ThreadSafeContext can be used to root

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: shu, Unassigned)

References

Details

Right now there are thingGCRooters both in ContextFriendFields and in PerThreadData. They should probably be unified into PerThreadData, and the ContextFriendFields field be made into a pointer. JSContext's thingGCRooters inside ContextFriendFields would be a pointer to &mainThread.thingGCRooters, and ForkJoinSlice's a pointer to perThreadData->thingGCRooters. This way ThreadSafeContexts can be used to root, as opposed to only JSContext or PerThreadData.
Blocks: 795030
Note that what I suggested in the first comment is an additional indirection and will be slower. Should also investigate removing it from PerThreadData.
Assignee: general → nobody
I tried this and it doesn't work because the ExclusiveContext in the parsing thread is suddenly racing with main thread uses. I've at least unified the definitions into RootLists.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.