зеркало из https://github.com/mozilla/gecko-dev.git
Watch for GCs under nativeLookup, bug 709863. r=dvander
This commit is contained in:
Родитель
17f3f4069d
Коммит
3cc89b2739
|
@ -90,7 +90,15 @@ ic::GetGlobalName(VMFrame &f, ic::GetGlobalNameIC *ic)
|
|||
JSAtom *atom = f.script()->getAtom(GET_INDEX(f.pc()));
|
||||
jsid id = ATOM_TO_JSID(atom);
|
||||
|
||||
RecompilationMonitor monitor(f.cx);
|
||||
|
||||
const Shape *shape = obj->nativeLookup(f.cx, id);
|
||||
|
||||
if (monitor.recompiled()) {
|
||||
stubs::GetGlobalName(f);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shape ||
|
||||
!shape->hasDefaultGetterOrIsMethod() ||
|
||||
!shape->hasSlot())
|
||||
|
@ -203,11 +211,16 @@ ic::SetGlobalName(VMFrame &f, ic::SetGlobalNameIC *ic)
|
|||
JSObject *obj = f.fp()->scopeChain().getGlobal();
|
||||
JSScript *script = f.script();
|
||||
JSAtom *atom = script->getAtom(GET_INDEX(f.pc()));
|
||||
|
||||
RecompilationMonitor monitor(f.cx);
|
||||
|
||||
const Shape *shape = obj->nativeLookup(f.cx, ATOM_TO_JSID(atom));
|
||||
|
||||
LookupStatus status = UpdateSetGlobalName(f, ic, obj, shape);
|
||||
if (status == Lookup_Error)
|
||||
THROW();
|
||||
if (!monitor.recompiled()) {
|
||||
LookupStatus status = UpdateSetGlobalName(f, ic, obj, shape);
|
||||
if (status == Lookup_Error)
|
||||
THROW();
|
||||
}
|
||||
|
||||
if (ic->usePropertyCache)
|
||||
STRICT_VARIANT(stubs::SetGlobalName)(f, atom);
|
||||
|
|
Загрузка…
Ссылка в новой задаче