nsRDFResource.h does not use frozen linkage

RESOLVED FIXED

Status

defect
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: mscott, Assigned: mscott)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

12 years ago
Now that we've got most of the string cleanup out of the way (see Bug #379070) I'm now actually starting to compile without MOZ_INTERNAL_API in mailnews\base.

The first non string error I ran into involved nsRDFResource.h

Mailnews includes nsRDFResource.h (http://mxr.mozilla.org/mozilla/source/rdf/util/public/nsRDFResource.h)
which does not support frozen linkage.

cc'ing Benjamin so I can better understand the best way for us to proceed.

As I see it we could:

1) Port rdf\util (which is just nsRDFResource.h/.cpp) to frozen linkage. But this gets linked in by rdf\base so this effectively means convert RDF to use frozen linkage.

2) Fork nsRDFResource.h/.cpp into mailnews\base\util and convert that implementation to use frozen linkage.
Assignee

Comment 1

12 years ago
This doesn't actually do anything of course because rdf\util gets linked in by rdf\base\src...

just saving off for safe keeping.

Comment 2

12 years ago
You're probably best-off ompiling two versions of rdfutil, one with internal linkage and one with external. You should be able to use the same sources, as long as you use nsStringGlue.h

See for example intl/unicharutil/util/internal/Makefile.in which builds an internal version of unicharutils from the same sources as intl/unicharutil/util/Makefile.in
OS: Windows Vista → All
Assignee

Comment 3

12 years ago
Posted patch first attemptSplinter Review
Thanks for the suggestion Benjamin.

This is my first attempts at implementing this idea. Still testing it out.
Assignee: nobody → mscott
Attachment #268274 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Assignee

Comment 4

12 years ago
Comment on attachment 268438 [details] [diff] [review]
first attempt

Benjamin, would it be better to export the library like unicharutil_s/unicharutil_external_s  instead of linking against the library from /rdf/util/src/internal ?
Attachment #268438 - Flags: superreview?(benjamin)

Comment 5

12 years ago
You're going to need to export the external-linkage version in order to get tbird+XR working, but you shouldn't export the internal-linkage version (just link directly from rdf/util/src/internal)

Comment 6

12 years ago
Comment on attachment 268438 [details] [diff] [review]
first attempt

>Index: rdf/util/src/Makefile.in

> EXTRA_DEPS += $(srcdir)/objs.mk
> 
> MODULE		= rdfutil
>-LIBRARY_NAME	= rdfutil_s
>-MOZILLA_INTERNAL_API = 1
>+LIBRARY_NAME	= rdfutil_external_s

Add DIST_INSTALL = 1 to this makefile.
Attachment #268438 - Flags: superreview?(benjamin) → superreview+
Assignee

Comment 7

12 years ago
fixed. Thanks for the pointers Benjamin.
Assignee

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.