mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[JAEGER] Merge.
This commit is contained in:
commit
516af02b02
@ -508,6 +508,39 @@ FrameRegsIter::operator++()
|
||||
return *this;
|
||||
}
|
||||
|
||||
JS_REQUIRES_STACK
|
||||
AllFramesIter::AllFramesIter(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(CURRENT_THREAD_IS_ME(cx->thread));
|
||||
|
||||
curcs = cx->stack()->getCurrentCallStack();
|
||||
if (!curcs) {
|
||||
curfp = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
curfp = curcs->getCurrentFrame();
|
||||
}
|
||||
|
||||
AllFramesIter &
|
||||
AllFramesIter::operator++()
|
||||
{
|
||||
JS_ASSERT(CURRENT_THREAD_IS_ME(cx->thread));
|
||||
JS_ASSERT(!done());
|
||||
|
||||
if (curfp == curcs->getInitialFrame()) {
|
||||
curcs = curcs->getPreviousInThread();
|
||||
if (curcs)
|
||||
curfp = curcs->getCurrentFrame();
|
||||
else
|
||||
curfp = NULL;
|
||||
} else {
|
||||
curfp = curfp->down;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
JSThreadData::init()
|
||||
{
|
||||
|
@ -651,9 +651,6 @@ class StackSpace
|
||||
inline Value *firstUnused() const;
|
||||
|
||||
inline void assertIsCurrent(JSContext *cx) const;
|
||||
#ifdef DEBUG
|
||||
CallStack *getCurrentCallStack() const { return currentCallStack; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allocate nvals on the top of the stack, report error on failure.
|
||||
@ -780,6 +777,8 @@ class StackSpace
|
||||
/* Our privates leak into xpconnect, which needs a public symbol. */
|
||||
JS_REQUIRES_STACK
|
||||
JS_FRIEND_API(bool) pushInvokeArgsFriendAPI(JSContext *, uintN, InvokeArgsGuard &);
|
||||
|
||||
CallStack *getCurrentCallStack() const { return currentCallStack; }
|
||||
};
|
||||
|
||||
JS_STATIC_ASSERT(StackSpace::CAPACITY_VALS % StackSpace::COMMIT_VALS == 0);
|
||||
@ -812,6 +811,20 @@ class FrameRegsIter
|
||||
jsbytecode *pc() const { return curpc; }
|
||||
};
|
||||
|
||||
class AllFramesIter
|
||||
{
|
||||
CallStack *curcs;
|
||||
JSStackFrame *curfp;
|
||||
|
||||
public:
|
||||
JS_REQUIRES_STACK AllFramesIter(JSContext *cx);
|
||||
|
||||
bool done() const { return curfp == NULL; }
|
||||
AllFramesIter &operator++();
|
||||
|
||||
JSStackFrame *fp() const { return curfp; }
|
||||
};
|
||||
|
||||
/* Holds the number of recording attemps for an address. */
|
||||
typedef HashMap<jsbytecode*,
|
||||
size_t,
|
||||
|
Loading…
Reference in New Issue
Block a user