Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Implementing cycle collector participant in external code?

7 views
Skip to first unread message

Mook

unread,
Jun 27, 2007, 12:43:13 AM6/27/07
to
Hi,

I'm trying to compile Firefox --disable-places-bookmarks.
Trunk/win32/msvc. I'm hitting a problem where the cycle collector stuff
can't be linked in, since (now with libxul) the cycle collector stuff is
only in xpcombase_s.lib.

So my question is, how would I implement a cycle collector participant
in code that doesn't end up in libxul?

Looking at the implementation, I don't think I'll be able to duplicate
the code using public APIs; and according to bug 372713 / bug 383939, I
_must_ implement a cycle collector participant. I just have no idea how
I can possibly link it.

(This is why I believe the fact that I'm building unsupported code
doesn't matter; the same question would arise for implementing RDF
datasources in extensions.)

Apologies if this is the wrong group - I just think cycle collector
stuff would go here :)

----
link -NOLOGO -DLL -OUT:brwsrcmp.dll -PDB:brwsrcmp.pdb -SUBSYSTEM:WINDOWS
nsModule.obj ./module.res -DEBUG -OPT:REF -OPT:nowin98
-IMPLIB:fake.lib ../migration/src/migration_s.lib
../feeds/src/browser_feeds_s.lib ../shell/src/shellservice_s.lib
../bookmarks/src/bookmarks_s.lib
../../../dist/lib/unicharutil_external_s.lib
../../../dist/../modules/libreg/src/mozreg_s.lib
../../../dist/lib/js3250.lib ../../../dist/lib/xpcomglue_s.lib
../../../dist/lib/xpcom.lib ../../../dist/lib/xul.lib
../../../dist/lib/nspr4.lib ../../../dist/lib/plc4.lib
../../../dist/lib/plds4.lib kernel32.lib user32.lib gdi32.lib
winmm.lib wsock32.lib advapi32.lib ole32.lib shell32.lib version.lib
Creating library fake.lib and object fake.exp
bookmarks_s.lib(nsBookmarksService.obj) : error LNK2019: unresolved
external symbol "void __cdecl nsCycleCollector_forget(class nsISupports
*)" (?nsCycleCollector_forget@@YAXPAVnsISupports@@@Z) referenced in
function "public: unsigned long __thiscall
nsCycleCollectingAutoRefCnt::incr(class nsISupports *)"
(?incr@nsCycleCollectingAutoRefCnt@@QAEKPAVnsISupports@@@Z)

and others for:
nsCycleCollector_suspect
nsXPCOMCycleCollectionParticipant::UnmarkPurple
nsXPCOMCycleCollectionParticipant::Unroot
nsXPCOMCycleCollectionParticipant::Unlink
nsXPCOMCycleCollectionParticipant::Root
nsXPCOMCycleCollectionParticipant::Traverse

--
Mook
mook dot moz plus stuff at gmail dot com

Benjamin Smedberg

unread,
Jun 27, 2007, 2:57:19 AM6/27/07
to
Mook wrote:

> So my question is, how would I implement a cycle collector participant
> in code that doesn't end up in libxul?

I'm not sure you can right now, and that sounds like a bug to me. File it
please? It's probably a pretty simple patch to expose it.

--BDS

Mook

unread,
Jun 27, 2007, 2:05:42 PM6/27/07
to
Filed as bug 386025.
0 new messages