Closed Bug 211315 Opened 21 years ago Closed 8 years ago

Make NS_InitEmbedding & NS_TermEmbedding work with XPCOM glue

Categories

(Core Graveyard :: Embedding: APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: adamlock, Assigned: adamlock)

Details

Attachments

(1 file, 1 obsolete file)

The embed_base_s is compiled without XPCOM glue so linking to it and
xpcomglue_s.lib still leaves a lot of unresolved dependencies.

NS_InitEmbedding and NS_TermEmbedding should probably be inlined in nsEmbedAPI.h
with #ifdef XPCOM_GLUE sections to initialise/shutdown the XPCOM glue if
defined. NS_HandleEmbeddingEvent should be inlined too and deprecated (since it
doesn't do anything)

The hacks in the functions to guard against reentrancy issues in XPCOM in the
code should be reexamined. Does XPCOM get properly torn down and freed when
NS_ShutdownXPCOM is called in glue mode?
Attached patch Work in progress (obsolete) — Splinter Review
Patch demonstrates the idea. A singleton _GeckoInitData class with
InitEmbedding and TermEmbedding methods is called by inline versions of
NS_InitEmbedding and NS_TermEmbedding. The embed_base_s lib is essentially
obsolete as embedders don't need to link to it. I just deleted
NS_HandleEmbeddingEvent and also removed the #ifdef sections that hacked around
reentrancy issues (since the #define that enabled these sections has been
commented out for a while)

I wonder if this patch should also export to embedcomponents to save people the
bother of depending on embed_base and embedcomponents from their makefiles.
Almost ready.

Patch moves nsEmbedAPI.h and the nsIWindowCreator(2).idl files into an
embedding/public dir and uses the embedcomponents (nsEmbedAPI.h pulls in
nsIStartupNotifier.h).

Patch does not contain changes to the Mac. I also have a build problem related
to the SDK_XPIDLSRCS and XPIDLSRCS values in the new public/Makefile.in. For
some reason the _xpidlgen is not properly created and I have to create that by
hand or the make fails when it tries to create nsIWindowCreator2.h.

Final patch will probably have to await my return from summer holiday.
Attachment #126852 - Attachment is obsolete: true
QA Contact: carosendahl → apis
Marking a bunch of bugs in the "Embedding: APIs" component INCOMPLETE in preparation to archive that component. If I have done this incorrectly, please reopen the bugs and move them to a more correct component as we don't have "embedding" APIs any more.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: