Bug 981201 - Stop using JS_IsRunning in PreciseGCRunnable::Run and remove JS_IsRunning. r=bholley

This commit is contained in:
Jan de Mooij 2016-11-15 10:58:30 +01:00
parent 922cccfc52
commit 44e40b79ad
5 changed files with 0 additions and 26 deletions

View File

@ -4881,12 +4881,6 @@ JS_RequestInterruptCallback(JSContext* cx)
cx->requestInterrupt(JSRuntime::RequestInterruptUrgent);
}
JS_PUBLIC_API(bool)
JS_IsRunning(JSContext* cx)
{
return cx->currentlyRunning();
}
JS::AutoSetAsyncStackForNewCalls::AutoSetAsyncStackForNewCalls(
JSContext* cx, HandleObject stack, const char* asyncCause,
JS::AutoSetAsyncStackForNewCalls::AsyncCallKind kind)

View File

@ -4602,13 +4602,6 @@ typedef bool
extern JS_PUBLIC_API(void)
SetAsyncTaskCallbacks(JSContext* cx, StartAsyncTaskCallback start, FinishAsyncTaskCallback finish);
} // namespace JS
extern JS_PUBLIC_API(bool)
JS_IsRunning(JSContext* cx);
namespace JS {
/**
* This class can be used to store a pointer to the youngest frame of a saved
* stack in the specified JSContext. This reference will be picked up by any new

View File

@ -943,12 +943,6 @@ JSContext::isThrowingDebuggeeWouldRun()
unwrappedException_.toObject().as<ErrorObject>().type() == JSEXN_DEBUGGEEWOULDRUN;
}
bool
JSContext::currentlyRunning() const
{
return !!activation();
}
static bool
ComputeIsJITBroken()
{

View File

@ -450,9 +450,6 @@ struct JSContext : public js::ExclusiveContext,
*/
bool asyncCallIsExplicit;
/* Whether this context has JS frames on the stack. */
bool currentlyRunning() const;
bool currentlyRunningInInterpreter() const {
return activation()->isInterpreter();
}

View File

@ -2627,10 +2627,6 @@ class PreciseGCRunnable : public Runnable
NS_IMETHOD Run() override
{
JSContext* cx = dom::danger::GetJSContext();
if (JS_IsRunning(cx))
return NS_DispatchToMainThread(this);
nsJSContext::GarbageCollectNow(gcreason::COMPONENT_UTILS,
nsJSContext::NonIncrementalGC,
mShrinking ?