From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- mozglue/android/nsGeckoUtils.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mozglue/android/nsGeckoUtils.cpp (limited to 'mozglue/android/nsGeckoUtils.cpp') diff --git a/mozglue/android/nsGeckoUtils.cpp b/mozglue/android/nsGeckoUtils.cpp new file mode 100644 index 0000000000..834e2d05fc --- /dev/null +++ b/mozglue/android/nsGeckoUtils.cpp @@ -0,0 +1,22 @@ +/* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include + +#include +#include +#include "APKOpen.h" + +extern "C" __attribute__((visibility("default"))) void MOZ_JNICALL +Java_org_mozilla_gecko_mozglue_GeckoLoader_putenv(JNIEnv* jenv, jclass, + jstring map) { + const char* str; + // XXX: java doesn't give us true UTF8, we should figure out something + // better to do here + str = jenv->GetStringUTFChars(map, nullptr); + if (str == nullptr) return; + putenv(strdup(str)); + jenv->ReleaseStringUTFChars(map, str); +} -- cgit v1.2.3