Closed Bug 941565 Opened 11 years ago Closed 11 years ago

OS.Constants.Path.libxul is incorrect on Android

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

(Keywords: addon-compat, dev-doc-needed)

Attachments

(1 file, 3 obsolete files)

OS.Constants.Path.libxul attempts to provide the full path to libxul. We generally don't need this full path, and on Android, getting the full path is a rather complex matter, as it depends on the location of the apk.

We should just provide the library name ("libxul.so", "xul.dll" or "XUL" depending on the platform).

Marking add-on compat in the unlikely case that some add-ons actually use that path information.
Attached patch Fixing OS.Constants.Path.libxul (obsolete) — Splinter Review
Assignee: nobody → dteller
Attachment #8335974 - Attachment is obsolete: true
Attachment #8336081 - Flags: review?(mh+mozilla)
Comment on attachment 8336081 [details] [diff] [review]
Fixing OS.Constants.Path.libxul, v2

Review of attachment 8336081 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/OSFileConstants.cpp
@@ +814,3 @@
>      xulPath.Append(NS_LITERAL_STRING(DLL_PREFIX));
>      xulPath.Append(NS_LITERAL_STRING("xul"));
>      xulPath.Append(NS_LITERAL_STRING(DLL_SUFFIX));

while you're here, you could make that NS_LITERAL_STRING(DLL_PREFIX "xul" DLL_SUFFIX)
Attachment #8336081 - Flags: review?(mh+mozilla) → review+
(In reply to Mike Hommey [:glandium] from comment #3)
> while you're here, you could make that NS_LITERAL_STRING(DLL_PREFIX "xul"
> DLL_SUFFIX)

Actually, that doesn't work with VC++.
(In reply to David Rajchenbach Teller [:Yoric] <needinfo? me> from comment #4)
> (In reply to Mike Hommey [:glandium] from comment #3)
> > while you're here, you could make that NS_LITERAL_STRING(DLL_PREFIX "xul"
> > DLL_SUFFIX)
> 
> Actually, that doesn't work with VC++.

O_o what does it say?
I don't remember, but here's an extract from https://developer.mozilla.org/en-US/docs/Mozilla_internal_string_guide: « Because some platforms do runtime conversion, the use of literal string concatenation inside a NS_LITERAL_STRING/NS_NAMED_LITERAL_STRING macro will compile on these platforms, but not on platforms which support compile-time conversion. »
https://hg.mozilla.org/integration/fx-team/rev/b0a4653325cc

Is this something we could have tests for?
Flags: in-testsuite?
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
We already have tests for all platforms except Android.
I should be able to cook one for Android. However, the real test will be bug 854169.
Attached patch Trivial test (obsolete) — Splinter Review
Trivial test. Self-reviewing, given the triviality.
Attachment #8336818 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/88dccf46c960
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla28
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: