Closed
Bug 386025
Opened 17 years ago
Closed 17 years ago
Expose cycle collection exports
Categories
(Core :: XPCOM, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: Mook, Assigned: benjamin)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
graydon
:
review+
|
Details | Diff | Splinter Review |
Currently, it is not possible to build a cycle collector participant in non-libxul code because a few necessary functions are not exposed for linking. They're in xpcombase_s but don't get exposed via libxul.
The missing exports are:
nsCycleCollector_forget
nsCycleCollector_suspect
nsXPCOMCycleCollectionParticipant::UnmarkPurple
nsXPCOMCycleCollectionParticipant::Unroot
nsXPCOMCycleCollectionParticipant::Unlink
nsXPCOMCycleCollectionParticipant::Root
nsXPCOMCycleCollectionParticipant::Traverse
Assignee | ||
Comment 1•17 years ago
|
||
Looks to me like nsXPCOMCycleCollectionParticipant can be moved directly into the glue.
We'd have to expose nsCycleCollector_forget and nsCycleCollector_suspect as XPCOM frozen exports, which I think would be ok.
Updated•17 years ago
|
Flags: blocking1.9?
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → benjamin
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #273827 -
Flags: review?(graydon)
Assignee | ||
Comment 3•17 years ago
|
||
For the record, I developed and tested this on Windows... I'm trying a Linux build with pragma visibility overnight.
And I copied/symlinked nsCycleCollectionParticipant.{cpp,h} from xpcom/base to xpcom/glue for the patch. I will just cvs remove/add them for the final commit.
Comment 4•17 years ago
|
||
I don't know enough about xpcom guts to say if that patch solves the problem, but the collector's client interface does properly include suspectCurrent, registerRuntime and forgetRuntime.
Assignee | ||
Comment 5•17 years ago
|
||
Well, I know the patch *works* ;-)
The decision I need you to comfortable with is exposing NS_CycleCollectorSuspect and NS_CycleCollectorForget as frozen exported functions which are supported "forever", where forever is the life of the 1.9 and 1.9.1 stable branches.
Comment 6•17 years ago
|
||
Comment on attachment 273827 [details] [diff] [review]
Export cyclecollector necessities, rev. 1
Long term support for these functions is, I think, not a problem: it is not detectable from the caller whether the functions do anything, so in the worst case if you wanted to remove the collector and leave in no-op stubs it would be harmless.
Attachment #273827 -
Flags: review?(graydon) → review+
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9 M8
Assignee | ||
Comment 7•17 years ago
|
||
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•