Backed out changeset d31171af48e4 (bug 1268034)

This commit is contained in:
Tooru Fujisawa 2016-05-19 20:47:07 +09:00
Родитель b79cb97a05
Коммит f999881884
3 изменённых файлов: 0 добавлений и 36 удалений

Просмотреть файл

@ -1,7 +0,0 @@
if (!('oomTest' in this))
quit();
oomTest(function() {
offThreadCompileScript("");
});
"".match();

Просмотреть файл

@ -221,32 +221,9 @@ GlobalObject::resolveConstructor(JSContext* cx, Handle<GlobalObject*> global, JS
return false;
}
// Set the constructor slot here to make it usable from JS_DefineFunctions,
// especially with JSProto_Function, as Function.prototype.toString is also
// a function.
// All failure cases from here should reset them to undefined, to avoid
// leaving partially initiallized object in the constructor slot.
global->setConstructor(key, ObjectValue(*ctor));
global->setConstructorPropertySlot(key, ObjectValue(*ctor));
if (!defineConstructorPropertiesAndLinkPrototype(cx, global, key, clasp, id,
ctor, proto))
{
global->setConstructor(key, UndefinedValue());
global->setConstructorPropertySlot(key, UndefinedValue());
return false;
}
return true;
}
/* static */ bool
GlobalObject::defineConstructorPropertiesAndLinkPrototype(JSContext* cx,
Handle<GlobalObject*> global,
JSProtoKey key, const Class* clasp,
HandleId id, HandleObject ctor,
HandleObject proto)
{
// Define any specified functions and properties, unless we're a dependent
// standard class (in which case they live on the prototype), or we're
// operating on the self-hosting global, in which case we don't want any

Просмотреть файл

@ -241,12 +241,6 @@ class GlobalObject : public NativeObject
}
private:
static bool defineConstructorPropertiesAndLinkPrototype(JSContext* cx,
Handle<GlobalObject*> global,
JSProtoKey key, const Class* clasp,
HandleId id, HandleObject ctor,
HandleObject proto);
bool arrayClassInitialized() const {
return classIsInitialized(JSProto_Array);
}