nsStaticComponent.h should be standalone friendly

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Marco Pesenti Gritti, Assigned: dougt)

Tracking

(Blocks: 1 bug)

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

13 years ago
Right now it cause the inclusion of nsString:

nsStaticComponent.h -> nsComponentLoader.h -> nsHashtable.h -> nsString.h

So it's not possible to do a static build of code using nsEmbedString.
We seem to only need the nsGetModuleProc definition from nsComponentLoader.h.
Maybe it would be possible to move it in another file ?
(Reporter)

Comment 1

13 years ago
More precisely the problem is that you cant include nsStaticComponent.h and use
embed string in the same file. It would be probably possible to work around the
problem in gtkmozembed using a separate file or something, though I think it
would be much more convenient to cleanup these headers if possible.
(Reporter)

Comment 2

13 years ago
Created attachment 148453 [details] [diff] [review]
possible fix
(Reporter)

Comment 3

13 years ago
Comment on attachment 148453 [details] [diff] [review]
possible fix

Does something like this make sense?
Attachment #148453 - Flags: review?(dougt)
(Reporter)

Updated

13 years ago
Attachment #148453 - Flags: review?(dougt)
(Reporter)

Comment 4

13 years ago
Created attachment 148565 [details] [diff] [review]
fix missing stdio inclusion
Attachment #148453 - Attachment is obsolete: true
(Reporter)

Comment 5

13 years ago
Comment on attachment 148565 [details] [diff] [review]
fix missing stdio inclusion

For gtkmozembed the alternative is to add an Init function to
EmbedComponents.cpp (there embed strings are not included) and do
NSGetStaticModuleInfo = gtk_getModuleInfo; in it instead of in
EmbedPrivate.cpp.
Not sure what I like better, I guess it depend if we expect to hit the same
problem somewhere else in the future. Up to you.
Attachment #148565 - Flags: superreview?(dougt)
Attachment #148565 - Flags: review?(darin)
(Assignee)

Comment 6

13 years ago
Comment on attachment 148565 [details] [diff] [review]
fix missing stdio inclusion

looks fine.
Attachment #148565 - Flags: superreview?(dougt) → superreview+

Comment 7

13 years ago
Comment on attachment 148565 [details] [diff] [review]
fix missing stdio inclusion

r=darin

kill extra newline at the end of nsModule.h

shouldn't we put @status FROZEN in this file?  and shouldn't it be exported to
the SDK?  (add to SDK_HEADERS in the Makefile?)

or is there some reason not to include this in the gecko sdk?
Attachment #148565 - Flags: review?(darin) → review+
I don't think that the current static component loader is sufficiently settled
to freeze it.

In particular, we're probably going to need to support multi-tier static
components (from libxul and client apps).
(Reporter)

Comment 9

13 years ago
Created attachment 148684 [details] [diff] [review]
kill extra newline
Attachment #148565 - Attachment is obsolete: true

Comment 10

13 years ago
fixed-on-trunk
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.