mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 677079 - Part u: Provide TriggerOperationCallbacksForActiveContexts in jsfriendapi.h; r=bhackett
This commit is contained in:
parent
070a861598
commit
9d6c493995
@ -1969,7 +1969,7 @@ namespace js {
|
||||
|
||||
/* These must be called with GC lock taken. */
|
||||
|
||||
JS_FRIEND_API(void)
|
||||
void
|
||||
TriggerOperationCallback(JSContext *cx);
|
||||
|
||||
void
|
||||
|
@ -586,4 +586,13 @@ IsContextRunningJS(JSContext *cx)
|
||||
return !cx->stack.empty();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(void)
|
||||
TriggerOperationCallbacksForActiveContexts(JSRuntime *rt)
|
||||
{
|
||||
JSContext* cx = NULL;
|
||||
while ((cx = js_NextActiveContext(rt, cx))) {
|
||||
TriggerOperationCallback(cx);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace js
|
||||
|
@ -538,6 +538,10 @@ CallContextDebugHandler(JSContext *cx, JSScript *script, jsbytecode *bc, Value *
|
||||
extern JS_FRIEND_API(bool)
|
||||
IsContextRunningJS(JSContext *cx);
|
||||
|
||||
/* Must be called with GC lock taken. */
|
||||
extern JS_FRIEND_API(void)
|
||||
TriggerOperationCallbacksForActiveContexts(JSRuntime *rt);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
/*
|
||||
|
@ -64,11 +64,6 @@
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "jscntxt.h"
|
||||
#if 0
|
||||
js_NextActiveContext, js::TriggerOperationCallback
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::xpconnect::memory;
|
||||
|
||||
@ -957,10 +952,7 @@ XPCJSRuntime::WatchdogMain(void *arg)
|
||||
#endif
|
||||
PR_WaitCondVar(self->mWatchdogWakeup, sleepInterval);
|
||||
JS_ASSERT(status == PR_SUCCESS);
|
||||
JSContext* cx = nsnull;
|
||||
while ((cx = js_NextActiveContext(self->mJSRuntime, cx))) {
|
||||
js::TriggerOperationCallback(cx);
|
||||
}
|
||||
js::TriggerOperationCallbacksForActiveContexts(self->mJSRuntime);
|
||||
}
|
||||
|
||||
/* Wake up the main thread waiting for the watchdog to terminate. */
|
||||
|
Loading…
Reference in New Issue
Block a user