Closed
Bug 789637
Opened 14 years ago
Closed 13 years ago
gc/Root.h should not depend on jspubtd.h
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: terrence, Unassigned)
References
Details
(Whiteboard: [js:t])
We should split out the friend bits of JSRuntime and JSContext into separate headers that are exposed to the API.
| Reporter | ||
Comment 1•14 years ago
|
||
To expound a bit on why this is needed: gc/Root.h needs to be able to inline the list insertion and removal code in its constructor and destructor. The fields we need to update are all in JSRuntime/JSContext. However, jscntxt.h needs access to Handle and Rooted's definitions: because they are templates we cannot just forward declare them. Fortunately, we already have JSContextFriendFields (CFF) and JSRuntimeFriendFields (RFF) for exactly this sort of purpose. In previous bugs we have moved CFF and RFF into jspubtd.h. This move was entirely because it is convenient: jspubtd.h happens, for completely arbitrary reasons, to be included where it is needed and it, also by chance, happens to not break horribly when we include it circularly like this. In short, we should make this chain robust against inclusion order, since it is part of the public API.
Updated•14 years ago
|
Whiteboard: [js:t]
| Reporter | ||
Comment 2•13 years ago
|
||
Nick has fixed our include ordering issues to a great degree in other bugs.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•