MFBT_APIs are getting exported from too many DLLs

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
5 years ago
5 years ago

People

(Reporter: dmajor, Unassigned)

Tracking

Trunk
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
I noticed that mozglue.dll exports a bunch of WebCore::Decimal and double_conversion functions. I don't think anybody actually needs these from mozglue, but the linker has to keep them around because of the export marking. I suspect that the intent was to export those functions only from mozjs, but mozglue ends up exporting them too because mozglue happened to pull in that header (or maybe vice versa).

These changes added MFBT_API on those functions:
https://hg.mozilla.org/integration/mozilla-inbound/rev/84eb9e72b338
https://hg.mozilla.org/integration/mozilla-inbound/rev/463626bffba7

MFBT_API is either an export marker or an import marker depending on whether you defined(IMPL_MFBT):
https://hg.mozilla.org/mozilla-central/file/5bb07c1ae9f5/mfbt/Types.h#l80

When I see that kind of code pattern, I kind of expect that there would be one implementor and the rest are consumers. But it seems that both JS and mozglue want to IMPL_MFBT:
http://mxr.mozilla.org/mozilla-central/search?string=IMPL_MFBT
(In reply to David Major [:dmajor] from comment #0)
> When I see that kind of code pattern, I kind of expect that there would be
> one implementor and the rest are consumers. But it seems that both JS and
> mozglue want to IMPL_MFBT:
> http://mxr.mozilla.org/mozilla-central/search?string=IMPL_MFBT

That's a red herring. JS only does that for standalone builds, where it builds mfbt itself.
(Reporter)

Comment 2

5 years ago
This appears to have been fixed by bug 870401.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.