Bug 1382099 - Remove MOZ_WIDGET_GONK from mozglue/. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 19 Jul 2017 18:38:54 +1000
changeset 418521 bd8cce1617e8a1f31521cd26980d9af4cf1cc8cf
parent 418520 932057f7c805d3630f23ffb60f65a477d892bd90
child 418522 d11f37fe35f751626aac85b9a5ae0173349204b0
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1382099
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382099 - Remove MOZ_WIDGET_GONK from mozglue/. r=glandium.
mozglue/build/BionicGlue.cpp
mozglue/misc/TimeStamp.h
--- a/mozglue/build/BionicGlue.cpp
+++ b/mozglue/build/BionicGlue.cpp
@@ -59,33 +59,16 @@ struct SpecialAllocator: public std::all
 private:
   mozilla::AlignedStorage2<T> buf;
   bool bufUsed;
 };
 
 static std::vector<AtForkFuncs, SpecialAllocator<AtForkFuncs> > atfork;
 #endif
 
-#ifdef MOZ_WIDGET_GONK
-#include "cpuacct.h"
-
-#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID)
-extern "C" NS_EXPORT int
-timer_create(clockid_t, struct sigevent*, timer_t*)
-{
-  __android_log_print(ANDROID_LOG_ERROR, "BionicGlue", "timer_create not supported!");
-  abort();
-  return -1;
-}
-#endif
-
-#else
-#define cpuacct_add(x)
-#endif
-
 #if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID)
 extern "C" NS_EXPORT int
 pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
 {
   AtForkFuncs funcs;
   funcs.prepare = prepare;
   funcs.parent = parent;
   funcs.child = child;
@@ -103,17 +86,16 @@ fork(void)
   pid_t pid;
   for (auto it = atfork.rbegin();
        it < atfork.rend(); ++it)
     if (it->prepare)
       it->prepare();
 
   switch ((pid = syscall(__NR_clone, SIGCHLD, NULL, NULL, NULL, NULL))) {
   case 0:
-    cpuacct_add(getuid());
     for (auto it = atfork.begin();
          it < atfork.end(); ++it)
       if (it->child)
         it->child();
     break;
   default:
     for (auto it = atfork.begin();
          it < atfork.end(); ++it)
@@ -135,23 +117,21 @@ raise(int sig)
   // equivalent to raise(sig), but Bionic also has a bug with these
   // functions, where a forked child will kill its parent instead.
 
   extern pid_t gettid(void);
   return syscall(__NR_tgkill, getpid(), gettid(), sig);
 }
 
 /* Flash plugin uses symbols that are not present in Android >= 4.4 */
-#ifndef MOZ_WIDGET_GONK
 namespace android {
   namespace VectorImpl {
     NS_EXPORT void reservedVectorImpl1(void) { }
     NS_EXPORT void reservedVectorImpl2(void) { }
     NS_EXPORT void reservedVectorImpl3(void) { }
     NS_EXPORT void reservedVectorImpl4(void) { }
     NS_EXPORT void reservedVectorImpl5(void) { }
     NS_EXPORT void reservedVectorImpl6(void) { }
     NS_EXPORT void reservedVectorImpl7(void) { }
     NS_EXPORT void reservedVectorImpl8(void) { }
   }
 }
-#endif
 
--- a/mozglue/misc/TimeStamp.h
+++ b/mozglue/misc/TimeStamp.h
@@ -422,18 +422,17 @@ public:
    * vsync timestamps, we enable the creation of mozilla::TimeStamps
    * on platforms that support vsync aligned refresh drivers / compositors
    * Verified true as of Jan 31, 2015: B2G and OS X
    * False on Windows 7
    * Android's event time uses CLOCK_MONOTONIC via SystemClock.uptimeMilles.
    * So it is same value of TimeStamp posix implementation.
    * UNTESTED ON OTHER PLATFORMS
    */
-#if defined(MOZ_WIDGET_GONK) || defined(XP_DARWIN) || \
-    defined(MOZ_WIDGET_ANDROID)
+#if defined(XP_DARWIN) || defined(MOZ_WIDGET_ANDROID)
   static TimeStamp FromSystemTime(int64_t aSystemTime)
   {
     static_assert(sizeof(aSystemTime) == sizeof(TimeStampValue),
                   "System timestamp should be same units as TimeStampValue");
     return TimeStamp(aSystemTime);
   }
 #endif