Closed Bug 1343395 Opened 3 years ago Closed 3 years ago
Collected JSContext and XPCJSContext into separate context and runtime classes
Now that the JS engine supports using multiple JSContexts in different cooperatively scheduled threads, we have to do the same thing in XPConnect and XPCOM. This patch splits CycleCollectedJSContext into CycleCollectedJSContext and CycleCollectedJSRuntime. It does a similar thing for XPCJSContext. The context classes contain members that are "call stack"-related. The runtime classes contain mostly GC-related stuff. To reduce churn, I added helper methods to the context classes that just call into the runtime class. For the most part, I think we still want consumers of these classes to use contexts as much as possible. The runtime class should be more of an implementation detail. Eventually I would like to move most of the members of the runtime classes to something like the Zone or TabGroup, so I would like to avoid exposing it too much. I structured the patch so that it looks like I copied the existing FooContext.cpp file into FooContext.cpp and FooRuntime.cpp and then deleted the unneeded parts from each one. I hope that helps make it easier to see the actual changes. Olli, feel free to forward this to someone else if you're too busy. It's kind of a big patch.
Close/Duplicate bug 1343396?
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1343396
3 years ago
You need to log in before you can comment on or make changes to this bug.