зеркало из https://github.com/mozilla/gecko-dev.git
Bug 967930 - Move AutoFlushCache instances in parallel ICs under lock. (r=efaust)
This commit is contained in:
Родитель
1716ba8f56
Коммит
ebdea55efd
|
@ -1844,8 +1844,6 @@ bool
|
|||
GetPropertyParIC::update(ForkJoinContext *cx, size_t cacheIndex,
|
||||
HandleObject obj, MutableHandleValue vp)
|
||||
{
|
||||
AutoFlushCache afc("GetPropertyParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
IonScript *ion = GetTopIonJSScript(cx)->parallelIonScript();
|
||||
GetPropertyParIC &cache = ion->getCache(cacheIndex).toGetPropertyPar();
|
||||
|
||||
|
@ -1864,6 +1862,9 @@ GetPropertyParIC::update(ForkJoinContext *cx, size_t cacheIndex,
|
|||
// new jitcode uses a global ExecutableAllocator tied to the runtime.
|
||||
LockedJSContext ncx(cx);
|
||||
|
||||
// The flusher needs to be under lock.
|
||||
AutoFlushCache afc("GetPropertyParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
if (cache.canAttachStub()) {
|
||||
bool alreadyStubbed;
|
||||
if (!cache.hasOrAddStubbedShape(ncx, obj->lastProperty(), &alreadyStubbed))
|
||||
|
@ -2842,8 +2843,6 @@ SetPropertyParIC::update(ForkJoinContext *cx, size_t cacheIndex, HandleObject ob
|
|||
{
|
||||
JS_ASSERT(cx->isThreadLocal(obj));
|
||||
|
||||
AutoFlushCache afc("SetPropertyParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
IonScript *ion = GetTopIonJSScript(cx)->parallelIonScript();
|
||||
SetPropertyParIC &cache = ion->getCache(cacheIndex).toSetPropertyPar();
|
||||
|
||||
|
@ -2860,7 +2859,9 @@ SetPropertyParIC::update(ForkJoinContext *cx, size_t cacheIndex, HandleObject ob
|
|||
bool attachedStub = false;
|
||||
|
||||
{
|
||||
// See note about locking context in GetPropertyParIC::update.
|
||||
LockedJSContext ncx(cx);
|
||||
AutoFlushCache afc("SetPropertyParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
if (cache.canAttachStub()) {
|
||||
bool alreadyStubbed;
|
||||
|
@ -3940,8 +3941,6 @@ bool
|
|||
GetElementParIC::update(ForkJoinContext *cx, size_t cacheIndex, HandleObject obj,
|
||||
HandleValue idval, MutableHandleValue vp)
|
||||
{
|
||||
AutoFlushCache afc("GetElementParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
IonScript *ion = GetTopIonJSScript(cx)->parallelIonScript();
|
||||
GetElementParIC &cache = ion->getCache(cacheIndex).toGetElementPar();
|
||||
|
||||
|
@ -3955,7 +3954,9 @@ GetElementParIC::update(ForkJoinContext *cx, size_t cacheIndex, HandleObject obj
|
|||
return true;
|
||||
|
||||
{
|
||||
// See note about locking context in GetPropertyParIC::update.
|
||||
LockedJSContext ncx(cx);
|
||||
AutoFlushCache afc("GetElementParCache", cx->runtime()->jitRuntime());
|
||||
|
||||
if (cache.canAttachStub()) {
|
||||
bool alreadyStubbed;
|
||||
|
|
Загрузка…
Ссылка в новой задаче