diff --git a/js/src/jsinterp.h b/js/src/jsinterp.h index 6bd0db85ad91..467586c562e3 100644 --- a/js/src/jsinterp.h +++ b/js/src/jsinterp.h @@ -134,11 +134,7 @@ struct JSStackFrame { #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 }; @@ -156,6 +152,15 @@ 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) {