Bug 624205: fix warning due to mismatched export declarations on MarkContext.
authorMike Shaver <shaver@mozilla.org>
Sat, 08 Jan 2011 18:55:54 -0800
changeset 60527 558d826c33bfb472d96704e09ff12978f3199d29
parent 60526 f497fca35415432c6c6277456cfc809f1de14145
child 60528 43fcf9a72eb39e90ff98552913155e6b70e15c86
push id18037
push usercleary@mozilla.com
push dateFri, 14 Jan 2011 17:42:55 +0000
treeherdermozilla-central@4e0501a0c5e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs624205
milestone2.0b9pre
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 624205: fix warning due to mismatched export declarations on MarkContext.
js/src/jscntxt.h
js/src/jsgc.cpp
js/src/jstracer.h
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -2277,17 +2277,17 @@ class AutoGCRooter {
     }
 
     /* Implemented in jsgc.cpp. */
     inline void trace(JSTracer *trc);
 
 #ifdef __GNUC__
 # pragma GCC visibility push(default)
 #endif
-    friend void MarkContext(JSTracer *trc, JSContext *acx);
+    friend JS_FRIEND_API(void) MarkContext(JSTracer *trc, JSContext *acx);
     friend void MarkRuntime(JSTracer *trc);
 #ifdef __GNUC__
 # pragma GCC visibility pop
 #endif
 
   protected:
     AutoGCRooter * const down;
 
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -1604,17 +1604,17 @@ AutoGCRooter::trace(JSTracer *trc)
     }
 
     JS_ASSERT(tag >= 0);
     MarkValueRange(trc, tag, static_cast<AutoArrayRooter *>(this)->array, "js::AutoArrayRooter.array");
 }
 
 namespace js {
 
-void
+JS_FRIEND_API(void)
 MarkContext(JSTracer *trc, JSContext *acx)
 {
     /* Stack frames and slots are traced by StackSpace::mark. */
 
     /* Mark other roots-by-definition in acx. */
     if (acx->globalObject && !JS_HAS_OPTION(acx, JSOPTION_UNROOTED_GLOBAL))
         MarkObject(trc, *acx->globalObject, "global object");
     if (acx->isExceptionPending())
--- a/js/src/jstracer.h
+++ b/js/src/jstracer.h
@@ -1621,17 +1621,17 @@ class TraceRecorder
             
             /*
              * Otherwise, only abort if the global is not present in the
              * import typemap. Just deep aborting false here is not acceptable,
              * because the recorder does not guard on every operation that
              * could lazily resolve. Since resolving adds properties to
              * reserved slots, the tracer will never have imported them.
              */
-            return tree->globalSlots->offsetOf(nativeGlobalSlot(vp)) == -1;
+            return tree->globalSlots->offsetOf((uint16)nativeGlobalSlot(vp)) == -1;
         }
         pendingGlobalSlotToSet = -1;
         return true;
     }
 
 #ifdef DEBUG
     /* Debug printing functionality to emit printf() on trace. */
     JS_REQUIRES_STACK void tprint(const char *format, int count, nanojit::LIns *insa[]);