mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 973563 - Correct assertion for zero-sized structs r=till
This commit is contained in:
parent
3140adb1b5
commit
ba30e5cf0d
@ -303,7 +303,8 @@ TypedObjectPointer.prototype.moveToFieldIndex = function(index) {
|
||||
"bad field descr");
|
||||
assert(TO_INT32(fieldOffset) === fieldOffset,
|
||||
"bad field offset");
|
||||
assert(fieldOffset >= 0 && fieldOffset < DESCR_SIZE(this.descr),
|
||||
assert(fieldOffset >= 0 &&
|
||||
(fieldOffset + DESCR_SIZE(fieldDescr)) <= DESCR_SIZE(this.descr),
|
||||
"out of bounds field offset");
|
||||
|
||||
this.descr = fieldDescr;
|
||||
|
9
js/src/jit-test/tests/TypedObject/bug973563.js
Normal file
9
js/src/jit-test/tests/TypedObject/bug973563.js
Normal file
@ -0,0 +1,9 @@
|
||||
// Test that empty sized structs don't trigger any assertion failures.
|
||||
// Public domain.
|
||||
|
||||
if (!this.hasOwnProperty("TypedObject"))
|
||||
quit();
|
||||
|
||||
var PointType = new TypedObject.StructType({});
|
||||
var LineType = new TypedObject.StructType({source: PointType, target: PointType});
|
||||
var fromAToB = new LineType({source: {x: 22, y: 44}, target: {x: 66, y: 88}});
|
Loading…
Reference in New Issue
Block a user