mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 2861ef67390a (bug 837566) for Linux32 mochitest-other shutdown hangs.
This commit is contained in:
parent
549336585a
commit
67b204034f
@ -571,7 +571,7 @@ nsJSObjWrapper::NP_Invalidate(NPObject *npobj)
|
||||
|
||||
if (jsnpobj && jsnpobj->mJSObj) {
|
||||
// Unroot the object's JSObject
|
||||
JS_RemoveObjectRootRT(sJSRuntime, &jsnpobj->mJSObj);
|
||||
js_RemoveRoot(sJSRuntime, &jsnpobj->mJSObj);
|
||||
|
||||
if (sJSObjWrappers.ops) {
|
||||
// Remove the wrapper from the hash
|
||||
|
@ -2349,52 +2349,52 @@ JS_PUBLIC_API(void)
|
||||
JS_RemoveValueRoot(JSContext *cx, jsval *vp)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
RemoveRoot(cx->runtime, (void *)vp);
|
||||
js_RemoveRoot(cx->runtime, (void *)vp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveStringRoot(JSContext *cx, JSString **rp)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
RemoveRoot(cx->runtime, (void *)rp);
|
||||
js_RemoveRoot(cx->runtime, (void *)rp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveObjectRoot(JSContext *cx, JSObject **rp)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
RemoveRoot(cx->runtime, (void *)rp);
|
||||
js_RemoveRoot(cx->runtime, (void *)rp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveScriptRoot(JSContext *cx, JSScript **rp)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
RemoveRoot(cx->runtime, (void *)rp);
|
||||
js_RemoveRoot(cx->runtime, (void *)rp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveValueRootRT(JSRuntime *rt, jsval *vp)
|
||||
{
|
||||
RemoveRoot(rt, (void *)vp);
|
||||
js_RemoveRoot(rt, (void *)vp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveStringRootRT(JSRuntime *rt, JSString **rp)
|
||||
{
|
||||
RemoveRoot(rt, (void *)rp);
|
||||
js_RemoveRoot(rt, (void *)rp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveObjectRootRT(JSRuntime *rt, JSObject **rp)
|
||||
{
|
||||
RemoveRoot(rt, (void *)rp);
|
||||
js_RemoveRoot(rt, (void *)rp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_RemoveScriptRootRT(JSRuntime *rt, JSScript **rp)
|
||||
{
|
||||
RemoveRoot(rt, (void *)rp);
|
||||
js_RemoveRoot(rt, (void *)rp);
|
||||
}
|
||||
|
||||
JS_NEVER_INLINE JS_PUBLIC_API(void)
|
||||
|
@ -3624,6 +3624,11 @@ JS_RemoveObjectRootRT(JSRuntime *rt, JSObject **rp);
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_RemoveScriptRootRT(JSRuntime *rt, JSScript **rp);
|
||||
|
||||
/* TODO: remove these APIs */
|
||||
|
||||
extern JS_FRIEND_API(void)
|
||||
js_RemoveRoot(JSRuntime *rt, void *rp);
|
||||
|
||||
/*
|
||||
* C-compatible version of the Anchor class. It should be called after the last
|
||||
* use of the variable it protects.
|
||||
|
@ -770,10 +770,10 @@ JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda)
|
||||
|
||||
pd = pda->array;
|
||||
for (i = 0; i < pda->length; i++) {
|
||||
RemoveRoot(cx->runtime, &pd[i].id);
|
||||
RemoveRoot(cx->runtime, &pd[i].value);
|
||||
js_RemoveRoot(cx->runtime, &pd[i].id);
|
||||
js_RemoveRoot(cx->runtime, &pd[i].value);
|
||||
if (pd[i].flags & JSPD_ALIAS)
|
||||
RemoveRoot(cx->runtime, &pd[i].alias);
|
||||
js_RemoveRoot(cx->runtime, &pd[i].alias);
|
||||
}
|
||||
js_free(pd);
|
||||
pda->array = NULL;
|
||||
|
@ -1084,8 +1084,8 @@ js::AddScriptRoot(JSContext *cx, JSScript **rp, const char *name)
|
||||
return AddRoot(cx, rp, name, JS_GC_ROOT_SCRIPT_PTR);
|
||||
}
|
||||
|
||||
void
|
||||
js::RemoveRoot(JSRuntime *rt, void *rp)
|
||||
JS_FRIEND_API(void)
|
||||
js_RemoveRoot(JSRuntime *rt, void *rp)
|
||||
{
|
||||
rt->gcRootsHash.remove(rp);
|
||||
rt->gcPoke = true;
|
||||
|
@ -514,9 +514,6 @@ AddObjectRoot(JSContext *cx, JSObject **rp, const char *name);
|
||||
extern JSBool
|
||||
AddScriptRoot(JSContext *cx, JSScript **rp, const char *name);
|
||||
|
||||
void
|
||||
RemoveRoot(JSRuntime *rt, void *rp);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
extern JSBool
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
bool Hold(JSRuntime* aRt) {
|
||||
// Do we really care about different runtimes?
|
||||
if (mRt && aRt != mRt) {
|
||||
JS_RemoveValueRootRT(mRt, &mVal);
|
||||
js_RemoveRoot(mRt, &mVal);
|
||||
mRt = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user