Set env vars before loading libraries

RESOLVED FIXED

Status

()

Core
Widget: Android
RESOLVED FIXED
8 years ago
5 years ago

People

(Reporter: blassey, Assigned: blassey)

Tracking

Trunk
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 457156 [details] [diff] [review]
patch

some of our initialization code check env vars and we set them too late for the values to be picked up as it stands

This patch also makes some changes to embedding/android/Makefile.in to allow make clean && make to work properly. Specifically it switches to using nsinstall and rm -rf, if there is a reason we weren't doing that before please explain and I'll drop that from the patch.
Attachment #457156 - Flags: review?(mwu)
(Assignee)

Updated

8 years ago
Blocks: 578496

Comment 1

8 years ago
Comment on attachment 457156 [details] [diff] [review]
patch

>+__attribute__ ((visibility("default")))
>+void JNICALL
>+Java_org_mozilla_gecko_GeckoAppShell_putenv(JNIEnv *jenv, jclass, jstring map)
>+{
>+    const char* str;
>+    str = jenv->GetStringUTFChars(map, NULL);
>+    if (str == NULL)
>+        return;
>+    putenv(strdup(str));
>+    jenv->ReleaseStringUTFChars(map, str);
>+}
>+
This is really my only issue with this patch, since java UTF8 isn't actually UTF8. Can't think of anything better that wouldn't make us depend on libxul though. Maybe put some sort of XXX about this issue here.
Attachment #457156 - Flags: review?(mwu) → review+
Perhaps we need an NS_ConvertJavaToUTF16
pushed http://hg.mozilla.org/mozilla-central/rev/8e58befb03a5
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

7 years ago
Assignee: nobody → blassey.bugs
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.