Potential bustage fix for weird Windows compilers. r=red
authorJeff Walden <jwalden@mit.edu>
Sat, 11 Apr 2009 15:01:17 -0700
changeset 27239 a94142e82a0d7084aef6756c987900d3b767af81
parent 27238 8c373da70f368c3950f19f013c617f052a4ed92b
child 27240 836d5856f1e5d07cc9cb5b39fd4bd8853f8196e0
push id6445
push userjwalden@mit.edu
push dateSat, 11 Apr 2009 22:03:15 +0000
treeherdermozilla-central@a94142e82a0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersred
milestone1.9.2a1pre
Potential bustage fix for weird Windows compilers. r=red
js/src/jsinterp.h
--- a/js/src/jsinterp.h
+++ b/js/src/jsinterp.h
@@ -129,21 +129,17 @@ struct JSStackFrame {
     JSObject        *xmlNamespace;  /* null or default xml namespace in E4X */
     JSStackFrame    *displaySave;   /* previous value of display entry for
                                        script->staticLevel */
 #ifdef DEBUG
     jsrefcount      pcDisabledSave; /* for balanced property cache control */
 #endif
 
 #ifdef __cplusplus /* Aargh, LiveConnect, bug 442399. */
-    void assertValidStackDepth(uintN depth) {
-        extern jsval *StackBase(JSStackFrame *fp);
-        JS_ASSERT(0 <= regs->sp - StackBase(this));
-        JS_ASSERT(depth <= uintptr_t(regs->sp - StackBase(this)));
-    }
+    inline void assertValidStackDepth(uintN depth);
 #endif
 };
 
 #ifdef __cplusplus
 static JS_INLINE uintN
 FramePCOffset(JSStackFrame* fp)
 {
     return uintN((fp->imacpc ? fp->imacpc : fp->regs->pc) - fp->script->code);
@@ -151,16 +147,25 @@ FramePCOffset(JSStackFrame* fp)
 #endif
 
 static JS_INLINE jsval *
 StackBase(JSStackFrame *fp)
 {
     return fp->slots + fp->script->nfixed;
 }
 
+#ifdef __cplusplus /* Aargh, LiveConnect, bug 442399. */
+void
+JSStackFrame::assertValidStackDepth(uintN depth)
+{
+    JS_ASSERT(0 <= regs->sp - StackBase(this));
+    JS_ASSERT(depth <= uintptr_t(regs->sp - StackBase(this)));
+}
+#endif
+
 static JS_INLINE uintN
 GlobalVarCount(JSStackFrame *fp)
 {
     uintN n;
     
     JS_ASSERT(!fp->fun);
     n = fp->script->nfixed;
     if (fp->script->regexpsOffset != 0)