Backed out changeset 7eee0cdd0feb (bug 1155985) for xpcshell-test failure

This commit is contained in:
Tooru Fujisawa 2015-04-22 20:08:25 +09:00
parent d958c4556d
commit 19bb1f6a78
2 changed files with 1 additions and 21 deletions

View File

@ -4963,7 +4963,7 @@ StructType::DefineInternal(JSContext* cx, JSObject* typeObj_, JSObject* fieldsOb
// Add field name to the hash
FieldInfo info;
info.mType = nullptr; // Value of fields are not yet traceable here.
info.mType = fieldType;
info.mIndex = i;
info.mOffset = fieldOffset;
ASSERT_OK(fields->add(entryPtr, name, info));
@ -4996,12 +4996,6 @@ StructType::DefineInternal(JSContext* cx, JSObject* typeObj_, JSObject* fieldsOb
if (!SizeTojsval(cx, structSize, &sizeVal))
return false;
for (FieldInfoHash::Range r = fields->all(); !r.empty(); r.popFront()) {
FieldInfo& field = r.front().value();
MOZ_ASSERT(field.mIndex < fieldRoots.length());
field.mType = &fieldRoots[field.mIndex].toObject();
}
JS_SetReservedSlot(typeObj, SLOT_FIELDINFO, PRIVATE_TO_JSVAL(fields.release()));
JS_SetReservedSlot(typeObj, SLOT_SIZE, sizeVal);

View File

@ -1,14 +0,0 @@
function test() {
for (let i = 0; i < 100; i++) {
let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t },
{ "bar": ctypes.uint32_t }]);
try {
new test_struct("foo", "x");
} catch (e) {
}
}
}
if (typeof ctypes === "object")
test();