From 16ae149f745b1f91efab9fe0fd93f85e37d0870e Mon Sep 17 00:00:00 2001 From: Eric Faust Date: Mon, 9 Jun 2014 14:34:34 -0700 Subject: [PATCH] Bug 1017862 - Followup: Fix bustage on a CLOSED TREE. (r=Waldo over IRC) --- js/src/jsapi.cpp | 3 ++- js/src/jsapi.h | 3 +++ js/src/jsproxy.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index fa1cd55db14..380fe2a8d7f 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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; } diff --git a/js/src/jsapi.h b/js/src/jsapi.h index d7dacf46989..b190bf6129b 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -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); diff --git a/js/src/jsproxy.cpp b/js/src/jsproxy.cpp index b652f47fc57..b8cf3f0f59c 100644 --- a/js/src/jsproxy.cpp +++ b/js/src/jsproxy.cpp @@ -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