Make NS_InitEmbedding & NS_TermEmbedding work with XPCOM glue

RESOLVED INCOMPLETE

Status

defect
RESOLVED INCOMPLETE
16 years ago
25 days ago

People

(Reporter: adamlock, Assigned: adamlock)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

16 years ago
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?
(Assignee)

Comment 1

16 years ago
Posted 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.
(Assignee)

Comment 2

16 years ago
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

Comment 3

3 years ago
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
Last Resolved: 3 years ago
Resolution: --- → INCOMPLETE

Updated

25 days ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.