diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 21:16:37 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 21:16:37 -0500 |
commit | 5496e4f391dd42ebde590eb0b041667490464a90 (patch) | |
tree | 4f822eb958ec5d2cb7eaff5215e24e3d3c44b21f /mozglue/misc | |
parent | 13a8e788810c006e964cc3a87c0ddb9ca1eb9114 (diff) | |
download | uxp-5496e4f391dd42ebde590eb0b041667490464a90.tar.gz |
Issue #1053 - Remove android support from mozglue
Yes, I checked for unsaved files this time...
Diffstat (limited to 'mozglue/misc')
-rw-r--r-- | mozglue/misc/StackWalk.cpp | 31 | ||||
-rw-r--r-- | mozglue/misc/TimeStamp_posix.cpp | 2 |
2 files changed, 1 insertions, 32 deletions
diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp index bb23b922a8..9d0df08f2c 100644 --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -59,12 +59,6 @@ static CriticalAddress gCriticalAddress; extern MOZ_EXPORT void* __libc_stack_end; // from ld-linux.so #endif -#ifdef ANDROID -#include <algorithm> -#include <unistd.h> -#include <pthread.h> -#endif - #if MOZ_STACKWALK_SUPPORTS_MACOSX #include <pthread.h> #include <sys/errno.h> @@ -931,31 +925,6 @@ MozStackWalk(MozWalkStackCallback aCallback, uint32_t aSkipFrames, stackEnd = __libc_stack_end; #elif defined(XP_DARWIN) stackEnd = pthread_get_stackaddr_np(pthread_self()); -#elif defined(ANDROID) - pthread_attr_t sattr; - pthread_attr_init(&sattr); - pthread_getattr_np(pthread_self(), &sattr); - void* stackBase = stackEnd = nullptr; - size_t stackSize = 0; - if (gettid() != getpid()) { - // bionic's pthread_attr_getstack doesn't tell the truth for the main - // thread (see bug 846670). So don't use it for the main thread. - if (!pthread_attr_getstack(&sattr, &stackBase, &stackSize)) { - stackEnd = static_cast<char*>(stackBase) + stackSize; - } else { - stackEnd = nullptr; - } - } - if (!stackEnd) { - // So consider the current frame pointer + an arbitrary size of 8MB - // (modulo overflow ; not really arbitrary as it's the default stack - // size for the main thread) if pthread_attr_getstack failed for - // some reason (or was skipped). - static const uintptr_t kMaxStackSize = 8 * 1024 * 1024; - uintptr_t maxStackStart = uintptr_t(-1) - kMaxStackSize; - uintptr_t stackStart = std::max(maxStackStart, uintptr_t(bp)); - stackEnd = reinterpret_cast<void*>(stackStart + kMaxStackSize); - } #else # error Unsupported configuration #endif diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp index 05deddea49..d6dfb40534 100644 --- a/mozglue/misc/TimeStamp_posix.cpp +++ b/mozglue/misc/TimeStamp_posix.cpp @@ -206,7 +206,7 @@ TimeStamp::Now(bool aHighResolution) return TimeStamp(ClockTimeNs()); } -#if defined(XP_LINUX) || defined(ANDROID) +#ifdef XP_LINUX // Calculates the amount of jiffies that have elapsed since boot and up to the // starttime value of a specific process as found in its /proc/*/stat file. |