mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
merge
This commit is contained in:
commit
bd4050adde
@ -3177,12 +3177,7 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/* Clear property cache weak references. */
|
||||||
* Clear property cache weak references and disable the cache so nothing
|
|
||||||
* can fill it during GC (this is paranoia, since scripts should not run
|
|
||||||
* during GC).
|
|
||||||
*/
|
|
||||||
js_DisablePropertyCache(cx);
|
|
||||||
js_FlushPropertyCache(cx);
|
js_FlushPropertyCache(cx);
|
||||||
|
|
||||||
#ifdef JS_THREADSAFE
|
#ifdef JS_THREADSAFE
|
||||||
@ -3204,7 +3199,6 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind)
|
|||||||
continue;
|
continue;
|
||||||
memset(acx->thread->gcFreeLists, 0, sizeof acx->thread->gcFreeLists);
|
memset(acx->thread->gcFreeLists, 0, sizeof acx->thread->gcFreeLists);
|
||||||
GSN_CACHE_CLEAR(&acx->thread->gsnCache);
|
GSN_CACHE_CLEAR(&acx->thread->gsnCache);
|
||||||
js_DisablePropertyCache(acx);
|
|
||||||
js_FlushPropertyCache(acx);
|
js_FlushPropertyCache(acx);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -3477,14 +3471,19 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind)
|
|||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(rt->shapeGen & SHAPE_OVERFLOW_BIT)) {
|
if (rt->shapeGen & SHAPE_OVERFLOW_BIT) {
|
||||||
js_EnablePropertyCache(cx);
|
/*
|
||||||
|
* FIXME bug 440834: The shape id space has overflowed. Currently we
|
||||||
|
* cope badly with this. Every call to js_GenerateShape does GC, and
|
||||||
|
* we never re-enable the property cache.
|
||||||
|
*/
|
||||||
|
js_DisablePropertyCache(cx);
|
||||||
#ifdef JS_THREADSAFE
|
#ifdef JS_THREADSAFE
|
||||||
iter = NULL;
|
iter = NULL;
|
||||||
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
|
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
|
||||||
if (!acx->thread || acx->thread == cx->thread)
|
if (!acx->thread || acx->thread == cx->thread)
|
||||||
continue;
|
continue;
|
||||||
js_EnablePropertyCache(acx);
|
js_DisablePropertyCache(acx);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -118,6 +118,7 @@ js_FillPropertyCache(JSContext *cx, JSObject *obj, jsuword kshape,
|
|||||||
JSAtom *atom;
|
JSAtom *atom;
|
||||||
JSPropCacheEntry *entry;
|
JSPropCacheEntry *entry;
|
||||||
|
|
||||||
|
JS_ASSERT(!cx->runtime->gcRunning);
|
||||||
cache = &JS_PROPERTY_CACHE(cx);
|
cache = &JS_PROPERTY_CACHE(cx);
|
||||||
pc = cx->fp->regs->pc;
|
pc = cx->fp->regs->pc;
|
||||||
if (cache->disabled) {
|
if (cache->disabled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user