[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-17.0.10esr-1] Fix MacOS GCC 4.2 build error.



commit 260fddaf9cfe79d3bf8f487522eb42116a6211e0
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Wed Oct 30 20:30:07 2013 -0700

    Fix MacOS GCC 4.2 build error.
    
    Fix is from https://bugzilla.mozilla.org/show_bug.cgi?id=783505.
---
 dom/workers/Events.cpp      |   24 +++++++++++++++++++
 dom/workers/Exceptions.cpp  |    6 +++++
 dom/workers/File.cpp        |   24 +++++++++++++++++++
 dom/workers/Worker.cpp      |   24 +++++++++++++++++++
 dom/workers/WorkerScope.cpp |   54 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 132 insertions(+)

diff --git a/dom/workers/Events.cpp b/dom/workers/Events.cpp
index d53ae16..8a4e029 100644
--- a/dom/workers/Events.cpp
+++ b/dom/workers/Events.cpp
@@ -248,7 +248,13 @@ private:
     {
       MOZ_STATIC_ASSERT(SLOT_FIRST <= Slot && Slot < SLOT_COUNT, "bad slot");
       JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+      // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+      // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+      return JS::CallNonGenericMethod(aCx, IsEvent, GetPropertyImpl<Slot>, args);
+#else
       return JS::CallNonGenericMethod<IsEvent, GetPropertyImpl<Slot> >(aCx, args);
+#endif
     }
   };
 
@@ -575,7 +581,13 @@ private:
     {
       MOZ_STATIC_ASSERT(SLOT_FIRST <= Slot && Slot < SLOT_COUNT, "bad slot");
       JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+      // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+      // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+      return JS::CallNonGenericMethod(aCx, IsMessageEvent, GetPropertyImpl<Slot>, args);
+#else
       return JS::CallNonGenericMethod<IsMessageEvent, GetPropertyImpl<Slot> >(aCx, args);
+#endif
     }
   };
 
@@ -774,7 +786,13 @@ private:
     {
       MOZ_STATIC_ASSERT(SLOT_FIRST <= Slot && Slot < SLOT_COUNT, "bad slot");
       JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+      // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+      // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+      return JS::CallNonGenericMethod(aCx, IsErrorEvent, GetPropertyImpl<Slot>, args);
+#else
       return JS::CallNonGenericMethod<IsErrorEvent, GetPropertyImpl<Slot> >(aCx, args);
+#endif
     }
   };
 
@@ -968,7 +986,13 @@ private:
     {
       MOZ_STATIC_ASSERT(SLOT_FIRST <= Slot && Slot < SLOT_COUNT, "bad slot");
       JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+      // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+      // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+      return JS::CallNonGenericMethod(aCx, IsProgressEvent, GetPropertyImpl<Slot>, args);
+#else
       return JS::CallNonGenericMethod<IsProgressEvent, GetPropertyImpl<Slot> >(aCx, args);
+#endif
     }
   };
 
diff --git a/dom/workers/Exceptions.cpp b/dom/workers/Exceptions.cpp
index bba1ac8..c20b028 100644
--- a/dom/workers/Exceptions.cpp
+++ b/dom/workers/Exceptions.cpp
@@ -165,7 +165,13 @@ private:
     {
       MOZ_STATIC_ASSERT(SLOT_FIRST <= Slot && Slot < SLOT_COUNT, "bad slot");
       JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+      // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+      // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+      return JS::CallNonGenericMethod(aCx, IsDOMException, GetPropertyImpl<Slot>, args);
+#else
       return JS::CallNonGenericMethod<IsDOMException, GetPropertyImpl<Slot> >(aCx, args);
+#endif
     }
   };
 };
diff --git a/dom/workers/File.cpp b/dom/workers/File.cpp
index 1f86dcf..e8cc406 100644
--- a/dom/workers/File.cpp
+++ b/dom/workers/File.cpp
@@ -138,7 +138,13 @@ private:
   GetSize(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsBlob, GetSizeImpl, args);
+#else
     return JS::CallNonGenericMethod<IsBlob, GetSizeImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -169,7 +175,13 @@ private:
   GetType(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsBlob, GetTypeImpl, args);
+#else
     return JS::CallNonGenericMethod<IsBlob, GetTypeImpl>(aCx, args);
+#endif
   }
 
   static JSBool
@@ -353,7 +365,13 @@ private:
   GetMozFullPath(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsFile, GetMozFullPathImpl, args);
+#else
     return JS::CallNonGenericMethod<IsFile, GetMozFullPathImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -381,7 +399,13 @@ private:
   GetName(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsFile, GetNameImpl, args);
+#else
     return JS::CallNonGenericMethod<IsFile, GetNameImpl>(aCx, args);
+#endif
   }
 };
 
diff --git a/dom/workers/Worker.cpp b/dom/workers/Worker.cpp
index 3c55847..d8b8af2 100644
--- a/dom/workers/Worker.cpp
+++ b/dom/workers/Worker.cpp
@@ -194,7 +194,13 @@ private:
   GetOnerror(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorker, GetOnerrorImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorker, GetOnerrorImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -207,7 +213,13 @@ private:
   GetOnmessage(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorker, GetOnmessageImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorker, GetOnmessageImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -248,7 +260,13 @@ private:
   SetOnerror(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorker, SetOnerrorImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorker, SetOnerrorImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -261,7 +279,13 @@ private:
   SetOnmessage(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorker, SetOnmessageImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorker, SetOnmessageImpl>(aCx, args);
+#endif
   }
 
   static JSBool
diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp
index 44dde47..fdb0bb0 100644
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -160,7 +160,13 @@ private:
   GetOnClose(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, GetOnCloseImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, GetOnCloseImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -192,7 +198,13 @@ private:
   SetOnClose(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, SetOnCloseImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, SetOnCloseImpl>(aCx, args);
+#endif
   }
 
   static WorkerGlobalScope*
@@ -217,7 +229,13 @@ private:
   GetSelf(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, GetSelfImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, GetSelfImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -274,7 +292,13 @@ private:
   GetLocation(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, GetLocationImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, GetLocationImpl>(aCx, args);
+#endif
   }
 
   static JSBool
@@ -347,7 +371,13 @@ private:
   GetOnErrorListener(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, GetOnErrorListenerImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, GetOnErrorListenerImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -396,7 +426,13 @@ private:
   SetOnErrorListener(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, SetOnErrorListenerImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, SetOnErrorListenerImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -424,7 +460,13 @@ private:
   GetNavigator(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsWorkerGlobalScope, GetNavigatorImpl, args);
+#else
     return JS::CallNonGenericMethod<IsWorkerGlobalScope, GetNavigatorImpl>(aCx, args);
+#endif
   }
 
   static JSBool
@@ -765,7 +807,13 @@ private:
   GetOnMessage(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsDedicatedWorkerGlobalScope, GetOnMessageImpl, args);
+#else
     return JS::CallNonGenericMethod<IsDedicatedWorkerGlobalScope, GetOnMessageImpl>(aCx, args);
+#endif
   }
 
   static bool
@@ -799,7 +847,13 @@ private:
   SetOnMessage(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
   {
     JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+    // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
+    // drop support for gcc 4.2. See bug 783505 for the details.
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+    return JS::CallNonGenericMethod(aCx, IsDedicatedWorkerGlobalScope, SetOnMessageImpl, args);
+#else
     return JS::CallNonGenericMethod<IsDedicatedWorkerGlobalScope, SetOnMessageImpl>(aCx, args);
+#endif
   }
 
   static DedicatedWorkerGlobalScope*

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits