mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-01 05:43:46 +00:00
fix bug 39373. make xpconnect calls into JS within a request for safety. a,r=brendan@mozilla.org
This commit is contained in:
parent
fe966835a2
commit
fae201b405
@ -45,14 +45,14 @@ static uint32 zero_methods_descriptor;
|
||||
|
||||
static inline void DoPreScriptEvaluated(JSContext* cx)
|
||||
{
|
||||
// XXX should we do this?
|
||||
// JS_BeginRequest(cx);
|
||||
if(JS_GetContextThread(cx))
|
||||
JS_BeginRequest(cx);
|
||||
}
|
||||
|
||||
static inline void DoPostScriptEvaluated(JSContext* cx)
|
||||
{
|
||||
// XXX should we do this?
|
||||
// JS_EndRequest(cx);
|
||||
if(JS_GetContextThread(cx))
|
||||
JS_EndRequest(cx);
|
||||
|
||||
#ifndef XPCONNECT_STANDALONE
|
||||
// If this is a DOM JSContext, then notify nsIScriptContext of script
|
||||
|
Loading…
Reference in New Issue
Block a user