Closed Bug 728071 Opened 12 years ago Closed 12 years ago

application.ini data should be in libmozglue.so, not libxul.so

Categories

(Core :: mozglue, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: ehsan.akhgari, Assigned: glandium)

References

Details

Attachments

(3 files)

      No description provided.
It's actually a feature, because nsAndroidStartup.cpp is where the buildid is hardcoded. Rebuilding changes the buildid, thus changing nsAndroidStartup.cpp. The actual problem is that the buildid is in nsAndroidStartup, or more precisely, that it is in libxul.so. It should be in libmozglue.so.
Assignee: nobody → mh+mozilla
Component: Build Config → mozglue
OS: Mac OS X → Android
QA Contact: build-config → mozglue
Hardware: x86 → All
Summary: Rebuilding a source tree with no changes causes nsAndroidStartup.cpp to be rebuilt → application.ini data should be in libmozglue.so, not libxul.so
This is required for the upcoming second part, which moves the definition of the nsXREAppData for mobile from within libxul.so to libmozglue.so. But since the latter is built almost first, a lot of the includes pulled from nsXULAppAPI.h are not available in dist/include (which would make the required -I list awfully long), or not even generated (prcpucfg.h ; this one is overridable, but it's imho pretty awful).
Attachment #598825 - Flags: review?(benjamin)
(In reply to Mike Hommey [:glandium] from comment #2)
> Created attachment 598825 [details] [diff] [review]
> part 1 - Move nsXREAppData definition in a separate header, and use it from
> application.ini.h
> 
> This is required for the upcoming second part, which moves the definition of
> the nsXREAppData for mobile from within libxul.so to libmozglue.so. But
> since the latter is built almost first, a lot of the includes pulled from
> nsXULAppAPI.h are not available in dist/include (which would make the
> required -I list awfully long), or not even generated (prcpucfg.h ; this one
> is overridable, but it's imho pretty awful).

Also note the patch replaces "PRUint32" with "unsigned int" in the struct definition, because we can't rely on prtypes.h, which includes prcpucfg.h.
Attachment #598826 - Flags: review?(blassey.bugs) → review+
Comment on attachment 598825 [details] [diff] [review]
part 1 - Move nsXREAppData definition in a separate header, and use it from application.ini.h

1) please fix my email address to benjamin@smedbergs.us in the license header while you're touching this

2) let's use uint32_t and mozilla/StdInt.h to get known-size values

3) please "#ifndef nsXREAppData_h" without the leading/trailing underscores, which are technically reserved

r=me with those changes. Note that I only want the compiled nsXREAppData struct in libmozglue.so on Android, since we should really put it in the Firefox binary on other platforms.
Attachment #598825 - Flags: review?(benjamin) → review+
It looks like this is not enough :(
Whiteboard: [leave open after inbound merge]
This is the missing part. Since nsAndroidStartup.cpp doesn't contain the buildid-dependent data anymore, no need for this dependency.
Attachment #599575 - Flags: review?(khuey)
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fa3f5864c20
Whiteboard: [leave open after inbound merge]
https://hg.mozilla.org/mozilla-central/rev/8fa3f5864c20
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Flags: in-testsuite-
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: