mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Backed out changeset 7eee0cdd0feb (bug 1155985) for xpcshell-test failure
This commit is contained in:
parent
592070ffda
commit
9c20e89e57
@ -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);
|
||||
|
@ -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();
|
Loading…
Reference in New Issue
Block a user