Closed
Bug 302099
Opened 19 years ago
Closed 19 years ago
How do embedders embed libxul?
Categories
(Toolkit :: Startup and Profile System, defect, P2)
Toolkit
Startup and Profile System
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: benjamin, Assigned: benjamin)
References
Details
(Keywords: fixed1.8, fixed1.8.0.1, fixed1.8.1)
Attachments
(2 files)
4.84 KB,
patch
|
darin.moz
:
second-review+
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
11.57 KB,
patch
|
darin.moz
:
first-review+
benjamin
:
approval1.8.0.1+
benjamin
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Supposedly libxul is supposed to be the next-generation embedding framework, but
currently embedders cannot "get at" the gecko components, because they are
statically linked. There are a couple options here, and I intend to implement
both of them:
1) expose the gecko static component list through a frozen API
XRE_GetStaticComponents. Embedders could get the static component list and then
call NS_InitXPCOM3 with this list (adding additional components as appropriate).
2) expose and freeze NS_InitEmbedding and the event-processing symbols directly
from libxul, instead of making them a static library... NS_InitEmbedding would
automatically get the gecko static components and initialize XPCOM with them.
I'm also going to try and get mfcembed/gtkembed/activex control to build using
libxul, to test that embedding actually works in this context. The amount of
testing we (don't) get for embedding contexts is depressing.
Assignee | ||
Updated•19 years ago
|
Blocks: xulrunner-1.8
Flags: blocking-aviary1.5+
Assignee | ||
Updated•19 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla1.8beta4
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #193825 -
Flags: first-review?(shaver)
Comment 2•19 years ago
|
||
Comment on attachment 193825 [details] [diff] [review]
Part 1 - expose XRE_GetStaticComponents [checked in on 1.8 branch]
r=darin
By the way, it looks like xpcom/components/nsStaticComponent.h should be CVS
removed.
Attachment #193825 -
Flags: second-review+
Assignee | ||
Updated•19 years ago
|
Attachment #193825 -
Flags: first-review?(shaver)
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 193825 [details] [diff] [review]
Part 1 - expose XRE_GetStaticComponents [checked in on 1.8 branch]
This is basically no-risk for the aviary apps (or anyone else for that matter).
Attachment #193825 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #193825 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 4•19 years ago
|
||
This builds, but I don't really have a way to test it in this tree. If it looks
good, I'd like to land it (on trunk) and then continue testing it on various
platforms and in various embedding contexts.
Attachment #194471 -
Flags: first-review?(darin)
Comment 5•19 years ago
|
||
Comment on attachment 194471 [details] [diff] [review]
XRE_InitEmbedding, rev. 1
>Index: toolkit/xre/nsEmbedFunctions.cpp
>+ nsEmbeddingDirProvider(nsILocalFile* aGREDir,
>+ nsILocalFile* aAppDir,
>+ nsIDirectoryServiceProvider* aAppProvider) :
nit: replace tabs with spaces (problem occurs elsewhere too)
>+ sCombined = (nsStaticModuleInfo*)
>+ malloc(sizeof(nsStaticModuleInfo) * combinedCount);
nit: operator new[] perhaps?
>+ nsStaticModuleInfo *current = sCombined;
>+ PRUint32 i;
>+ for (i = 0; i < kStaticModuleCount; ++i) {
>+ *current = kPStaticModules[i];
>+ ++current;
>+ }
>+
>+ for (i = 0; i < aStaticComponentCount; ++i) {
>+ *current = aStaticComponents[i];
>+ ++current;
>+ }
these look like two calls to memcpy to me :)
so, it looks to me like an embedder will still need to manage their
own profile directory. we don't yet give them a canned directory
service provider that does that for them, right?
r=darin
Attachment #194471 -
Flags: first-review?(darin) → first-review+
Assignee | ||
Comment 6•19 years ago
|
||
> so, it looks to me like an embedder will still need to manage their
> own profile directory. we don't yet give them a canned directory
> service provider that does that for them, right?
For the moment, yes. We need to think about this a lot more carefully in 1.9,
especially WRT profile sharing and having the embed apps run basically
"profileless". For right now, they should statically link the
profdirserviceprovider_s thingie and use it (it is glue-safe under the right
circumstances).
Fixed on trunk. I'll use new bugs to patch the various embedders to actually use
this API for testing purposes before requesting 1.8 branch approval.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking-aviary1.5+ → blocking1.8b5+
Comment 7•19 years ago
|
||
time is short for beta so if this is gonna make the branch, it needs to land ASAP.
Comment 8•19 years ago
|
||
If this isn't landed today, it's not going to make the train.
Assignee | ||
Comment 9•19 years ago
|
||
This is not going to make b4, and doesn't need to. We can get it done later as
necessary.
Assignee | ||
Comment 10•19 years ago
|
||
Comment on attachment 193825 [details] [diff] [review]
Part 1 - expose XRE_GetStaticComponents [checked in on 1.8 branch]
Part 1 checked in on the 1.8 branch.
Attachment #193825 -
Attachment description: Part 1 - expose XRE_GetStaticComponents → Part 1 - expose XRE_GetStaticComponents [checked in on 1.8 branch]
Comment 11•19 years ago
|
||
what's left here and is part >1 a blocker to 1.5?
Assignee | ||
Comment 12•19 years ago
|
||
Per discussion with darin, part 2 does not need to land on 1.8 branch.
Keywords: fixed1.8
Comment 13•19 years ago
|
||
Comment on attachment 194471 [details] [diff] [review]
XRE_InitEmbedding, rev. 1
Requesting 1.8.0.1 approval. This patch is XULRunner only and doesn't affect Firefox or Thunderbird. This code is needed by the Javaconnect code, to allow embedding XULRunner in Java.
Attachment #194471 -
Flags: approval1.8.0.1?
Updated•19 years ago
|
Attachment #194471 -
Flags: approval1.8.1?
Comment 14•19 years ago
|
||
Comment on attachment 194471 [details] [diff] [review]
XRE_InitEmbedding, rev. 1
Please consider for 1.8.1 - 1.8.0.1 is for major security and crash issues only.
Attachment #194471 -
Flags: approval1.8.0.1? → approval1.8.0.1-
Assignee | ||
Comment 15•19 years ago
|
||
Comment on attachment 194471 [details] [diff] [review]
XRE_InitEmbedding, rev. 1
Re-requesting approval per drivers email, this is not built into anything except libxul/xulrunner.
Attachment #194471 -
Flags: approval1.8.0.1- → approval1.8.0.1?
Assignee | ||
Comment 16•19 years ago
|
||
Comment on attachment 194471 [details] [diff] [review]
XRE_InitEmbedding, rev. 1
a=drivers
Attachment #194471 -
Flags: approval1.8.1?
Attachment #194471 -
Flags: approval1.8.1+
Attachment #194471 -
Flags: approval1.8.0.1?
Attachment #194471 -
Flags: approval1.8.0.1+
Assignee | ||
Comment 17•19 years ago
|
||
XRE_InitEmbedding bits landed on 1.8.0.1 and 1.8.1
Keywords: fixed1.8.0.1,
fixed1.8.1
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•