Potential bustage fix for weird Windows compilers. r=red

This commit is contained in:
Jeff Walden 2009-04-11 15:01:17 -07:00
parent 255671b586
commit 61100d8fcf

View File

@ -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)
{