diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-14 16:57:01 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 15:17:54 +0200 |
commit | 28a3cd1028612b3b577768519d11fa6fbcda6f09 (patch) | |
tree | 61a64f843d3bfed644305987dbe1482d7b39c11a /js/src/wasm | |
parent | f987138760b344a8869e319f28400acc438d0553 (diff) | |
download | uxp-28a3cd1028612b3b577768519d11fa6fbcda6f09.tar.gz |
Issue #1053 - First pass Android defines and remove Android Annotation
processors, some Andoid packaging stuff, Eclipse IDE support et al.
Diffstat (limited to 'js/src/wasm')
-rw-r--r-- | js/src/wasm/WasmSignalHandlers.cpp | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp index b45d05ebd2..dae590acba 100644 --- a/js/src/wasm/WasmSignalHandlers.cpp +++ b/js/src/wasm/WasmSignalHandlers.cpp @@ -34,13 +34,6 @@ using JS::GenericNaN; using mozilla::DebugOnly; using mozilla::PodArrayZero; -#if defined(ANDROID) -# include <sys/system_properties.h> -# if defined(MOZ_LINKER) -extern "C" MFBT_API bool IsSignalHandlingBroken(); -# endif -#endif - // For platforms where the signal/exception handler runs on the same // thread/stack as the victim (Unix and Windows), we can use TLS to find any // currently executing wasm code. @@ -260,86 +253,6 @@ class AutoSetHandlingSegFault # endif #endif -#if defined(ANDROID) -// Not all versions of the Android NDK define ucontext_t or mcontext_t. -// Detect this and provide custom but compatible definitions. Note that these -// follow the GLibc naming convention to access register values from -// mcontext_t. -// -// See: https://chromiumcodereview.appspot.com/10829122/ -// See: http://code.google.com/p/android/issues/detail?id=34784 -# if !defined(__BIONIC_HAVE_UCONTEXT_T) -# if defined(__arm__) - -// GLibc on ARM defines mcontext_t has a typedef for 'struct sigcontext'. -// Old versions of the C library <signal.h> didn't define the type. -# if !defined(__BIONIC_HAVE_STRUCT_SIGCONTEXT) -# include <asm/sigcontext.h> -# endif - -typedef struct sigcontext mcontext_t; - -typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - // Other fields are not used so don't define them here. -} ucontext_t; - -# elif defined(__mips__) - -typedef struct { - uint32_t regmask; - uint32_t status; - uint64_t pc; - uint64_t gregs[32]; - uint64_t fpregs[32]; - uint32_t acx; - uint32_t fpc_csr; - uint32_t fpc_eir; - uint32_t used_math; - uint32_t dsp; - uint64_t mdhi; - uint64_t mdlo; - uint32_t hi1; - uint32_t lo1; - uint32_t hi2; - uint32_t lo2; - uint32_t hi3; - uint32_t lo3; -} mcontext_t; - -typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - // Other fields are not used so don't define them here. -} ucontext_t; - -# elif defined(__i386__) -// x86 version for Android. -typedef struct { - uint32_t gregs[19]; - void* fpregs; - uint32_t oldmask; - uint32_t cr2; -} mcontext_t; - -typedef uint32_t kernel_sigset_t[2]; // x86 kernel uses 64-bit signal masks -typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - // Other fields are not used by V8, don't define them here. -} ucontext_t; -enum { REG_EIP = 14 }; -# endif // defined(__i386__) -# endif // !defined(__BIONIC_HAVE_UCONTEXT_T) -#endif // defined(ANDROID) - #if !defined(XP_WIN) # define CONTEXT ucontext_t #endif @@ -977,25 +890,6 @@ ProcessHasSignalHandlers() if (getenv("JS_DISABLE_SLOW_SCRIPT_SIGNALS") || getenv("JS_NO_SIGNALS")) return false; -#if defined(ANDROID) - // Before Android 4.4 (SDK version 19), there is a bug - // https://android-review.googlesource.com/#/c/52333 - // in Bionic's pthread_join which causes pthread_join to return early when - // pthread_kill is used (on any thread). Nobody expects the pthread_cond_wait - // EINTRquisition. - char version_string[PROP_VALUE_MAX]; - PodArrayZero(version_string); - if (__system_property_get("ro.build.version.sdk", version_string) > 0) { - if (atol(version_string) < 19) - return false; - } -# if defined(MOZ_LINKER) - // Signal handling is broken on some android systems. - if (IsSignalHandlingBroken()) - return false; -# endif -#endif - // The interrupt handler allows the main thread to be paused from another // thread (see InterruptRunningJitCode). #if defined(XP_WIN) |