mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 634542 - Temporary diagnosis patch (r=dmandelin,a=shaver)
This commit is contained in:
parent
bc2b58aa9d
commit
04ad54d7a4
@ -1002,6 +1002,10 @@ js_GetCallObject(JSContext *cx, JSStackFrame *fp)
|
||||
if (fp->hasCallObj())
|
||||
return &fp->callObj();
|
||||
|
||||
JS_ASSERT(!fp->isEvalFrame());
|
||||
if (fp->isEvalFrame())
|
||||
*((int *)0xeca1) = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
/* A call object should be a frame's outermost scope chain element. */
|
||||
Class *clasp = fp->scopeChain().getClass();
|
||||
@ -1369,11 +1373,25 @@ call_resolve(JSContext *cx, JSObject *obj, jsid id, uintN flags,
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_PUBLIC_DATA(volatile JSStackFrame *volatile) leakage;
|
||||
|
||||
static void
|
||||
call_trace(JSTracer *trc, JSObject *obj)
|
||||
{
|
||||
JSStackFrame frameCopy[3];
|
||||
|
||||
JS_ASSERT(obj->isCall());
|
||||
if (JSStackFrame *fp = obj->maybeCallObjStackFrame()) {
|
||||
memset(&frameCopy[0], 0xaa, sizeof(JSStackFrame));
|
||||
memcpy(&frameCopy[1], fp, sizeof(JSStackFrame));
|
||||
memset(&frameCopy[2], 0xbb, sizeof(JSStackFrame));
|
||||
leakage = frameCopy;
|
||||
|
||||
bool bad = fp->isEvalFrame() && !fp->script()->strictModeCode;
|
||||
JS_ASSERT(!bad);
|
||||
if (bad)
|
||||
*(int *)0xbad = 0;
|
||||
|
||||
/*
|
||||
* FIXME: Hide copies of stack values rooted by fp from the Cycle
|
||||
* Collector, which currently lacks a non-stub Unlink implementation
|
||||
|
@ -110,6 +110,22 @@ using namespace js::gc;
|
||||
JSObject *const JSStackFrame::sInvalidScopeChain = (JSObject *)0xbeef;
|
||||
#endif
|
||||
|
||||
JS_NEVER_INLINE void
|
||||
js::PutActivationObjects(JSContext *cx, JSStackFrame *fp)
|
||||
{
|
||||
JS_ASSERT(fp->isFunctionFrame() && !fp->isEvalFrame());
|
||||
|
||||
if (fp->isEvalFrame())
|
||||
*((int *)0x1337) = 0;
|
||||
|
||||
/* The order is important as js_PutCallObject needs to access argsObj. */
|
||||
if (fp->hasCallObj()) {
|
||||
js_PutCallObject(cx, fp);
|
||||
} else if (fp->hasArgsObj()) {
|
||||
js_PutArgsObject(cx, fp);
|
||||
}
|
||||
}
|
||||
|
||||
jsbytecode *
|
||||
JSStackFrame::pc(JSContext *cx, JSStackFrame *next)
|
||||
{
|
||||
|
@ -837,7 +837,7 @@ ReportIncompatibleMethod(JSContext *cx, Value *vp, Class *clasp);
|
||||
template <typename T>
|
||||
bool GetPrimitiveThis(JSContext *cx, Value *vp, T *v);
|
||||
|
||||
inline void
|
||||
void
|
||||
PutActivationObjects(JSContext *cx, JSStackFrame *fp);
|
||||
|
||||
/*
|
||||
|
@ -524,19 +524,6 @@ struct AutoInterpPreparer {
|
||||
}
|
||||
};
|
||||
|
||||
inline void
|
||||
PutActivationObjects(JSContext *cx, JSStackFrame *fp)
|
||||
{
|
||||
JS_ASSERT(fp->isFunctionFrame() && !fp->isEvalFrame());
|
||||
|
||||
/* The order is important as js_PutCallObject needs to access argsObj. */
|
||||
if (fp->hasCallObj()) {
|
||||
js_PutCallObject(cx, fp);
|
||||
} else if (fp->hasArgsObj()) {
|
||||
js_PutArgsObject(cx, fp);
|
||||
}
|
||||
}
|
||||
|
||||
class InvokeSessionGuard
|
||||
{
|
||||
InvokeArgsGuard args_;
|
||||
|
Loading…
Reference in New Issue
Block a user