зеркало из https://github.com/mozilla/gecko-dev.git
Bug 880697 - Make JS_ClearScriptTraps take a runtime directly. r=gabor
This obviates the need for a context at the JSD callsite.
This commit is contained in:
Родитель
f66756e79c
Коммит
73a4b6ea32
|
@ -911,7 +911,6 @@ jsd_ClearAllExecutionHooksForScript(JSDContext* jsdc, JSDScript* jsdscript)
|
|||
{
|
||||
JSDExecHook* jsdhook;
|
||||
JSCList* list = &jsdscript->hooks;
|
||||
|
||||
JSD_LOCK();
|
||||
|
||||
while( (JSDExecHook*)list != (jsdhook = (JSDExecHook*)list->next) )
|
||||
|
@ -920,8 +919,7 @@ jsd_ClearAllExecutionHooksForScript(JSDContext* jsdc, JSDScript* jsdscript)
|
|||
free(jsdhook);
|
||||
}
|
||||
|
||||
/* No cross-compartment call here because we may be in the middle of GC */
|
||||
JS_ClearScriptTraps(jsdc->dumbContext, jsdscript->script);
|
||||
JS_ClearScriptTraps(jsdc->jsrt, jsdscript->script);
|
||||
JSD_UNLOCK();
|
||||
|
||||
return JS_TRUE;
|
||||
|
|
|
@ -254,9 +254,9 @@ JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc,
|
|||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ClearScriptTraps(JSContext *cx, JSScript *script)
|
||||
JS_ClearScriptTraps(JSRuntime *rt, JSScript *script)
|
||||
{
|
||||
script->clearTraps(cx->runtime()->defaultFreeOp());
|
||||
script->clearTraps(rt->defaultFreeOp());
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
|
|
|
@ -111,7 +111,7 @@ JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc,
|
|||
JSTrapHandler *handlerp, jsval *closurep);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ClearScriptTraps(JSContext *cx, JSScript *script);
|
||||
JS_ClearScriptTraps(JSRuntime *rt, JSScript *script);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ClearAllTrapsForCompartment(JSContext *cx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче