Bug 1017862 - Followup: Fix bustage on a CLOSED TREE. (r=Waldo over IRC)

This commit is contained in:
Eric Faust 2014-06-09 14:34:34 -07:00
parent f5cf6555d9
commit 16ae149f74
3 changed files with 6 additions and 2 deletions

View File

@ -516,7 +516,8 @@ JS_IsBuiltinFunctionConstructor(JSFunction *fun)
enum InitState { Uninitialized, Running, ShutDown };
static InitState jsInitState = Uninitialized;
bool jsIsShutDown()
JS_PUBLIC_API(bool)
JS_IsShutDown(void)
{
return jsInitState == ShutDown;
}

View File

@ -1260,6 +1260,9 @@ JS_Init(void);
extern JS_PUBLIC_API(void)
JS_ShutDown(void);
extern JS_PUBLIC_API(bool)
JS_IsShutDown(void);
extern JS_PUBLIC_API(JSRuntime *)
JS_NewRuntime(uint32_t maxbytes, JSRuntime *parentRuntime = nullptr);

View File

@ -88,7 +88,7 @@ BaseProxyHandler::BaseProxyHandler(const void *family)
BaseProxyHandler::~BaseProxyHandler()
{
MOZ_RELEASE_ASSERT(jsIsShutDown(), "Proxy handler destructor called with engine running?");
MOZ_RELEASE_ASSERT(JS_IsShutDown(), "Proxy handler destructor called with engine running?");
}
bool