зеркало из https://github.com/mozilla/gecko-dev.git
Bug 951693 - Fix some newly-discovered rooting hazards in jsinfer.cpp; r=terrence
This commit is contained in:
Родитель
4a498bde24
Коммит
5ebc220cc7
|
@ -2044,14 +2044,14 @@ AnalyzePoppedThis(JSContext *cx, types::TypeObject *type,
|
|||
if (!definitelyExecuted)
|
||||
return true;
|
||||
|
||||
if (!types::AddClearDefiniteGetterSetterForPrototypeChain(cx, type, NameToId(setprop->name()))) {
|
||||
RootedId id(cx, NameToId(setprop->name()));
|
||||
if (!types::AddClearDefiniteGetterSetterForPrototypeChain(cx, type, id)) {
|
||||
// The prototype chain already contains a getter/setter for this
|
||||
// property, or type information is too imprecise.
|
||||
return true;
|
||||
}
|
||||
|
||||
DebugOnly<unsigned> slotSpan = baseobj->slotSpan();
|
||||
RootedId id(cx, NameToId(setprop->name()));
|
||||
RootedValue value(cx, UndefinedValue());
|
||||
if (!DefineNativeProperty(cx, baseobj, id, value, nullptr, nullptr,
|
||||
JSPROP_ENUMERATE, 0, 0))
|
||||
|
|
|
@ -2344,6 +2344,8 @@ void
|
|||
TypeCompartment::setTypeToHomogenousArray(ExclusiveContext *cx,
|
||||
JSObject *obj, Type elementType)
|
||||
{
|
||||
JS_ASSERT(cx->compartment()->activeAnalysis);
|
||||
|
||||
if (!arrayTypeTable) {
|
||||
arrayTypeTable = cx->new_<ArrayTypeTable>();
|
||||
if (!arrayTypeTable || !arrayTypeTable->init()) {
|
||||
|
@ -3231,7 +3233,7 @@ class TypeConstraintClearDefiniteGetterSetter : public TypeConstraint
|
|||
};
|
||||
|
||||
bool
|
||||
types::AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, TypeObject *type, jsid id)
|
||||
types::AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, TypeObject *type, HandleId id)
|
||||
{
|
||||
/*
|
||||
* Ensure that if the properties named here could have a getter, setter or
|
||||
|
|
|
@ -719,7 +719,7 @@ class TemporaryTypeSet : public TypeSet
|
|||
};
|
||||
|
||||
bool
|
||||
AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, TypeObject *type, jsid id);
|
||||
AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, TypeObject *type, HandleId id);
|
||||
|
||||
void
|
||||
AddClearDefiniteFunctionUsesInScript(JSContext *cx, TypeObject *type,
|
||||
|
|
Загрузка…
Ссылка в новой задаче