зеркало из https://github.com/mozilla/gecko-dev.git
Sprinkle #ifdef JS_THREADSAFE so the non-threadsafe shell builds again. It was broken by 641a33d0932f (bug 626743).
This commit is contained in:
Родитель
4a60b81db6
Коммит
6ccd4fae6a
|
@ -130,7 +130,9 @@ JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug)
|
||||||
// Find all live scripts
|
// Find all live scripts
|
||||||
|
|
||||||
JSContext *iter = NULL;
|
JSContext *iter = NULL;
|
||||||
|
#ifdef JS_THREADSAFE
|
||||||
jsword currentThreadId = reinterpret_cast<jsword>(js_CurrentThreadId());
|
jsword currentThreadId = reinterpret_cast<jsword>(js_CurrentThreadId());
|
||||||
|
#endif
|
||||||
typedef HashSet<JSScript *, DefaultHasher<JSScript*>, ContextAllocPolicy> ScriptMap;
|
typedef HashSet<JSScript *, DefaultHasher<JSScript*>, ContextAllocPolicy> ScriptMap;
|
||||||
ScriptMap liveScripts(cx);
|
ScriptMap liveScripts(cx);
|
||||||
if (!liveScripts.init())
|
if (!liveScripts.init())
|
||||||
|
@ -138,9 +140,11 @@ JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug)
|
||||||
|
|
||||||
JSContext *icx;
|
JSContext *icx;
|
||||||
while ((icx = JS_ContextIterator(rt, &iter))) {
|
while ((icx = JS_ContextIterator(rt, &iter))) {
|
||||||
|
#ifdef JS_THREADSAFE
|
||||||
if (JS_GetContextThread(icx) != currentThreadId)
|
if (JS_GetContextThread(icx) != currentThreadId)
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (AllFramesIter i(icx); !i.done(); ++i) {
|
for (AllFramesIter i(icx); !i.done(); ++i) {
|
||||||
JSScript *script = i.fp()->maybeScript();
|
JSScript *script = i.fp()->maybeScript();
|
||||||
if (script)
|
if (script)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче