LibIDL: Change overload sets to be ordered

We fill these overload sets from vectors, which means that by the time
we iterated over them, any semblance of their original ordering was
lost. Their ordering is important, because we invoke
define_native_function() for them which eventually stores ordered
properties.

This should not be an issue as long as iterating over a HashMap that was
filled in exactly the same way results in the same ordering. However,
HashTable utilizes kmalloc_good_size() to determine a good allocation
size - and the implementation for kmalloc_good_size() on Linux and macOS
differs, causing a different capacity and ordering on those platforms.

This was not caught by CI, because we run that with sanitizers enabled
which overrides malloc_good_size() on macOS, resulting in the same
behavior as on Linux.

Change the overload sets to be OrderedHashMaps instead and rebaseline
the failing test.
This commit is contained in:
Jelle Raaijmakers 2025-08-25 16:36:49 +02:00 committed by Jelle Raaijmakers
commit 2e910dd6e1
Notes: github-actions[bot] 2025-08-26 08:15:36 +00:00
2 changed files with 323 additions and 323 deletions

View file

@ -323,9 +323,9 @@ public:
Vector<NonnullOwnPtr<Interface>> partial_interfaces;
Vector<Interface&> imported_modules;
HashMap<ByteString, Vector<Function&>> overload_sets;
HashMap<ByteString, Vector<Function&>> static_overload_sets;
HashMap<ByteString, Vector<Constructor&>> constructor_overload_sets;
OrderedHashMap<ByteString, Vector<Function&>> overload_sets;
OrderedHashMap<ByteString, Vector<Function&>> static_overload_sets;
OrderedHashMap<ByteString, Vector<Constructor&>> constructor_overload_sets;
// https://webidl.spec.whatwg.org/#dfn-support-indexed-properties
bool supports_indexed_properties() const { return indexed_property_getter.has_value(); }

View file

@ -1,360 +1,360 @@
== CSS property descriptors
svw writable: true
svw configurable: true
svw enumerable: true
svw value before: function svw() { [native code] }
svw value after: replaced
lvmax writable: true
lvmax configurable: true
lvmax enumerable: true
lvmax value before: function lvmax() { [native code] }
lvmax value after: replaced
rad writable: true
rad configurable: true
rad enumerable: true
rad value before: function rad() { [native code] }
rad value after: replaced
ic writable: true
ic configurable: true
ic enumerable: true
ic value before: function ic() { [native code] }
ic value after: replaced
in writable: true
in configurable: true
in enumerable: true
in value before: function in() { [native code] }
in value after: replaced
Hz writable: true
Hz configurable: true
Hz enumerable: true
Hz value before: function Hz() { [native code] }
Hz value after: replaced
pc writable: true
pc configurable: true
pc enumerable: true
pc value before: function pc() { [native code] }
pc value after: replaced
rch writable: true
rch configurable: true
rch enumerable: true
rch value before: function rch() { [native code] }
rch value after: replaced
vb writable: true
vb configurable: true
vb enumerable: true
vb value before: function vb() { [native code] }
vb value after: replaced
number writable: true
number configurable: true
number enumerable: true
number value before: function number() { [native code] }
number value after: replaced
dpcm writable: true
dpcm configurable: true
dpcm enumerable: true
dpcm value before: function dpcm() { [native code] }
dpcm value after: replaced
mm writable: true
mm configurable: true
mm enumerable: true
mm value before: function mm() { [native code] }
mm value after: replaced
cqb writable: true
cqb configurable: true
cqb enumerable: true
cqb value before: function cqb() { [native code] }
cqb value after: replaced
supports writable: true
supports configurable: true
supports enumerable: true
supports value before: function supports() { [native code] }
supports value after: replaced
ric writable: true
ric configurable: true
ric enumerable: true
ric value before: function ric() { [native code] }
ric value after: replaced
dvmin writable: true
dvmin configurable: true
dvmin enumerable: true
dvmin value before: function dvmin() { [native code] }
dvmin value after: replaced
svmin writable: true
svmin configurable: true
svmin enumerable: true
svmin value before: function svmin() { [native code] }
svmin value after: replaced
Q writable: true
Q configurable: true
Q enumerable: true
Q value before: function Q() { [native code] }
Q value after: replaced
pt writable: true
pt configurable: true
pt enumerable: true
pt value before: function pt() { [native code] }
pt value after: replaced
deg writable: true
deg configurable: true
deg enumerable: true
deg value before: function deg() { [native code] }
deg value after: replaced
vi writable: true
vi configurable: true
vi enumerable: true
vi value before: function vi() { [native code] }
vi value after: replaced
rex writable: true
rex configurable: true
rex enumerable: true
rex value before: function rex() { [native code] }
rex value after: replaced
ex writable: true
ex configurable: true
ex enumerable: true
ex value before: function ex() { [native code] }
ex value after: replaced
percent writable: true
percent configurable: true
percent enumerable: true
percent value before: function percent() { [native code] }
percent value after: replaced
rlh writable: true
rlh configurable: true
rlh enumerable: true
rlh value before: function rlh() { [native code] }
rlh value after: replaced
lvi writable: true
lvi configurable: true
lvi enumerable: true
lvi value before: function lvi() { [native code] }
lvi value after: replaced
lvmin writable: true
lvmin configurable: true
lvmin enumerable: true
lvmin value before: function lvmin() { [native code] }
lvmin value after: replaced
dvi writable: true
dvi configurable: true
dvi enumerable: true
dvi value before: function dvi() { [native code] }
dvi value after: replaced
lvw writable: true
lvw configurable: true
lvw enumerable: true
lvw value before: function lvw() { [native code] }
lvw value after: replaced
dvw writable: true
dvw configurable: true
dvw enumerable: true
dvw value before: function dvw() { [native code] }
dvw value after: replaced
turn writable: true
turn configurable: true
turn enumerable: true
turn value before: function turn() { [native code] }
turn value after: replaced
registerProperty writable: true
registerProperty configurable: true
registerProperty enumerable: true
registerProperty value before: function registerProperty() { [native code] }
registerProperty value after: replaced
fr writable: true
fr configurable: true
fr enumerable: true
fr value before: function fr() { [native code] }
fr value after: replaced
cqmin writable: true
cqmin configurable: true
cqmin enumerable: true
cqmin value before: function cqmin() { [native code] }
cqmin value after: replaced
rcap writable: true
rcap configurable: true
rcap enumerable: true
rcap value before: function rcap() { [native code] }
rcap value after: replaced
dppx writable: true
dppx configurable: true
dppx enumerable: true
dppx value before: function dppx() { [native code] }
dppx value after: replaced
rem writable: true
rem configurable: true
rem enumerable: true
rem value before: function rem() { [native code] }
rem value after: replaced
svh writable: true
svh configurable: true
svh enumerable: true
svh value before: function svh() { [native code] }
svh value after: replaced
dvh writable: true
dvh configurable: true
dvh enumerable: true
dvh value before: function dvh() { [native code] }
dvh value after: replaced
vh writable: true
vh configurable: true
vh enumerable: true
vh value before: function vh() { [native code] }
vh value after: replaced
cap writable: true
cap configurable: true
cap enumerable: true
cap value before: function cap() { [native code] }
cap value after: replaced
px writable: true
px configurable: true
px enumerable: true
px value before: function px() { [native code] }
px value after: replaced
grad writable: true
grad configurable: true
grad enumerable: true
grad value before: function grad() { [native code] }
grad value after: replaced
svmax writable: true
svmax configurable: true
svmax enumerable: true
svmax value before: function svmax() { [native code] }
svmax value after: replaced
escape writable: true
escape configurable: true
escape enumerable: true
escape value before: function escape() { [native code] }
escape value after: replaced
cqw writable: true
cqw configurable: true
cqw enumerable: true
cqw value before: function cqw() { [native code] }
cqw value after: replaced
s writable: true
s configurable: true
s enumerable: true
s value before: function s() { [native code] }
s value after: replaced
supports writable: true
supports configurable: true
supports enumerable: true
supports value before: function supports() { [native code] }
supports value after: replaced
registerProperty writable: true
registerProperty configurable: true
registerProperty enumerable: true
registerProperty value before: function registerProperty() { [native code] }
registerProperty value after: replaced
number writable: true
number configurable: true
number enumerable: true
number value before: function number() { [native code] }
number value after: replaced
percent writable: true
percent configurable: true
percent enumerable: true
percent value before: function percent() { [native code] }
percent value after: replaced
cap writable: true
cap configurable: true
cap enumerable: true
cap value before: function cap() { [native code] }
cap value after: replaced
ch writable: true
ch configurable: true
ch enumerable: true
ch value before: function ch() { [native code] }
ch value after: replaced
vmax writable: true
vmax configurable: true
vmax enumerable: true
vmax value before: function vmax() { [native code] }
vmax value after: replaced
ms writable: true
ms configurable: true
ms enumerable: true
ms value before: function ms() { [native code] }
ms value after: replaced
lvh writable: true
lvh configurable: true
lvh enumerable: true
lvh value before: function lvh() { [native code] }
lvh value after: replaced
vw writable: true
vw configurable: true
vw enumerable: true
vw value before: function vw() { [native code] }
vw value after: replaced
cqh writable: true
cqh configurable: true
cqh enumerable: true
cqh value before: function cqh() { [native code] }
cqh value after: replaced
em writable: true
em configurable: true
em enumerable: true
em value before: function em() { [native code] }
em value after: replaced
dpi writable: true
dpi configurable: true
dpi enumerable: true
dpi value before: function dpi() { [native code] }
dpi value after: replaced
cqi writable: true
cqi configurable: true
cqi enumerable: true
cqi value before: function cqi() { [native code] }
cqi value after: replaced
cm writable: true
cm configurable: true
cm enumerable: true
cm value before: function cm() { [native code] }
cm value after: replaced
vmin writable: true
vmin configurable: true
vmin enumerable: true
vmin value before: function vmin() { [native code] }
vmin value after: replaced
cqmax writable: true
cqmax configurable: true
cqmax enumerable: true
cqmax value before: function cqmax() { [native code] }
cqmax value after: replaced
dvb writable: true
dvb configurable: true
dvb enumerable: true
dvb value before: function dvb() { [native code] }
dvb value after: replaced
ex writable: true
ex configurable: true
ex enumerable: true
ex value before: function ex() { [native code] }
ex value after: replaced
ic writable: true
ic configurable: true
ic enumerable: true
ic value before: function ic() { [native code] }
ic value after: replaced
lh writable: true
lh configurable: true
lh enumerable: true
lh value before: function lh() { [native code] }
lh value after: replaced
rcap writable: true
rcap configurable: true
rcap enumerable: true
rcap value before: function rcap() { [native code] }
rcap value after: replaced
rch writable: true
rch configurable: true
rch enumerable: true
rch value before: function rch() { [native code] }
rch value after: replaced
rem writable: true
rem configurable: true
rem enumerable: true
rem value before: function rem() { [native code] }
rem value after: replaced
rex writable: true
rex configurable: true
rex enumerable: true
rex value before: function rex() { [native code] }
rex value after: replaced
ric writable: true
ric configurable: true
ric enumerable: true
ric value before: function ric() { [native code] }
ric value after: replaced
rlh writable: true
rlh configurable: true
rlh enumerable: true
rlh value before: function rlh() { [native code] }
rlh value after: replaced
vw writable: true
vw configurable: true
vw enumerable: true
vw value before: function vw() { [native code] }
vw value after: replaced
vh writable: true
vh configurable: true
vh enumerable: true
vh value before: function vh() { [native code] }
vh value after: replaced
vi writable: true
vi configurable: true
vi enumerable: true
vi value before: function vi() { [native code] }
vi value after: replaced
vb writable: true
vb configurable: true
vb enumerable: true
vb value before: function vb() { [native code] }
vb value after: replaced
vmin writable: true
vmin configurable: true
vmin enumerable: true
vmin value before: function vmin() { [native code] }
vmin value after: replaced
vmax writable: true
vmax configurable: true
vmax enumerable: true
vmax value before: function vmax() { [native code] }
vmax value after: replaced
svw writable: true
svw configurable: true
svw enumerable: true
svw value before: function svw() { [native code] }
svw value after: replaced
svh writable: true
svh configurable: true
svh enumerable: true
svh value before: function svh() { [native code] }
svh value after: replaced
svi writable: true
svi configurable: true
svi enumerable: true
svi value before: function svi() { [native code] }
svi value after: replaced
kHz writable: true
kHz configurable: true
kHz enumerable: true
kHz value before: function kHz() { [native code] }
kHz value after: replaced
dvmax writable: true
dvmax configurable: true
dvmax enumerable: true
dvmax value before: function dvmax() { [native code] }
dvmax value after: replaced
lvb writable: true
lvb configurable: true
lvb enumerable: true
lvb value before: function lvb() { [native code] }
lvb value after: replaced
svb writable: true
svb configurable: true
svb enumerable: true
svb value before: function svb() { [native code] }
svb value after: replaced
svmin writable: true
svmin configurable: true
svmin enumerable: true
svmin value before: function svmin() { [native code] }
svmin value after: replaced
svmax writable: true
svmax configurable: true
svmax enumerable: true
svmax value before: function svmax() { [native code] }
svmax value after: replaced
lvw writable: true
lvw configurable: true
lvw enumerable: true
lvw value before: function lvw() { [native code] }
lvw value after: replaced
lvh writable: true
lvh configurable: true
lvh enumerable: true
lvh value before: function lvh() { [native code] }
lvh value after: replaced
lvi writable: true
lvi configurable: true
lvi enumerable: true
lvi value before: function lvi() { [native code] }
lvi value after: replaced
lvb writable: true
lvb configurable: true
lvb enumerable: true
lvb value before: function lvb() { [native code] }
lvb value after: replaced
lvmin writable: true
lvmin configurable: true
lvmin enumerable: true
lvmin value before: function lvmin() { [native code] }
lvmin value after: replaced
lvmax writable: true
lvmax configurable: true
lvmax enumerable: true
lvmax value before: function lvmax() { [native code] }
lvmax value after: replaced
dvw writable: true
dvw configurable: true
dvw enumerable: true
dvw value before: function dvw() { [native code] }
dvw value after: replaced
dvh writable: true
dvh configurable: true
dvh enumerable: true
dvh value before: function dvh() { [native code] }
dvh value after: replaced
dvi writable: true
dvi configurable: true
dvi enumerable: true
dvi value before: function dvi() { [native code] }
dvi value after: replaced
dvb writable: true
dvb configurable: true
dvb enumerable: true
dvb value before: function dvb() { [native code] }
dvb value after: replaced
dvmin writable: true
dvmin configurable: true
dvmin enumerable: true
dvmin value before: function dvmin() { [native code] }
dvmin value after: replaced
dvmax writable: true
dvmax configurable: true
dvmax enumerable: true
dvmax value before: function dvmax() { [native code] }
dvmax value after: replaced
cqw writable: true
cqw configurable: true
cqw enumerable: true
cqw value before: function cqw() { [native code] }
cqw value after: replaced
cqh writable: true
cqh configurable: true
cqh enumerable: true
cqh value before: function cqh() { [native code] }
cqh value after: replaced
cqi writable: true
cqi configurable: true
cqi enumerable: true
cqi value before: function cqi() { [native code] }
cqi value after: replaced
cqb writable: true
cqb configurable: true
cqb enumerable: true
cqb value before: function cqb() { [native code] }
cqb value after: replaced
cqmin writable: true
cqmin configurable: true
cqmin enumerable: true
cqmin value before: function cqmin() { [native code] }
cqmin value after: replaced
cqmax writable: true
cqmax configurable: true
cqmax enumerable: true
cqmax value before: function cqmax() { [native code] }
cqmax value after: replaced
cm writable: true
cm configurable: true
cm enumerable: true
cm value before: function cm() { [native code] }
cm value after: replaced
mm writable: true
mm configurable: true
mm enumerable: true
mm value before: function mm() { [native code] }
mm value after: replaced
Q writable: true
Q configurable: true
Q enumerable: true
Q value before: function Q() { [native code] }
Q value after: replaced
in writable: true
in configurable: true
in enumerable: true
in value before: function in() { [native code] }
in value after: replaced
pt writable: true
pt configurable: true
pt enumerable: true
pt value before: function pt() { [native code] }
pt value after: replaced
pc writable: true
pc configurable: true
pc enumerable: true
pc value before: function pc() { [native code] }
pc value after: replaced
px writable: true
px configurable: true
px enumerable: true
px value before: function px() { [native code] }
px value after: replaced
deg writable: true
deg configurable: true
deg enumerable: true
deg value before: function deg() { [native code] }
deg value after: replaced
grad writable: true
grad configurable: true
grad enumerable: true
grad value before: function grad() { [native code] }
grad value after: replaced
rad writable: true
rad configurable: true
rad enumerable: true
rad value before: function rad() { [native code] }
rad value after: replaced
turn writable: true
turn configurable: true
turn enumerable: true
turn value before: function turn() { [native code] }
turn value after: replaced
s writable: true
s configurable: true
s enumerable: true
s value before: function s() { [native code] }
s value after: replaced
ms writable: true
ms configurable: true
ms enumerable: true
ms value before: function ms() { [native code] }
ms value after: replaced
Hz writable: true
Hz configurable: true
Hz enumerable: true
Hz value before: function Hz() { [native code] }
Hz value after: replaced
kHz writable: true
kHz configurable: true
kHz enumerable: true
kHz value before: function kHz() { [native code] }
kHz value after: replaced
dpi writable: true
dpi configurable: true
dpi enumerable: true
dpi value before: function dpi() { [native code] }
dpi value after: replaced
dpcm writable: true
dpcm configurable: true
dpcm enumerable: true
dpcm value before: function dpcm() { [native code] }
dpcm value after: replaced
dppx writable: true
dppx configurable: true
dppx enumerable: true
dppx value before: function dppx() { [native code] }
dppx value after: replaced
fr writable: true
fr configurable: true
fr enumerable: true
fr value before: function fr() { [native code] }
fr value after: replaced
== WebAssembly property descriptors
compile writable: true
compile configurable: true
compile enumerable: true
compile value before: function compile() { [native code] }
compile value after: replaced
instantiate writable: true
instantiate configurable: true
instantiate enumerable: true
instantiate value before: function instantiate() { [native code] }
instantiate value after: replaced
compileStreaming writable: true
compileStreaming configurable: true
compileStreaming enumerable: true
compileStreaming value before: function compileStreaming() { [native code] }
compileStreaming value after: replaced
instantiateStreaming writable: true
instantiateStreaming configurable: true
instantiateStreaming enumerable: true
instantiateStreaming value before: function instantiateStreaming() { [native code] }
instantiateStreaming value after: replaced
validate writable: true
validate configurable: true
validate enumerable: true
validate value before: function validate() { [native code] }
validate value after: replaced
compile writable: true
compile configurable: true
compile enumerable: true
compile value before: function compile() { [native code] }
compile value after: replaced
compileStreaming writable: true
compileStreaming configurable: true
compileStreaming enumerable: true
compileStreaming value before: function compileStreaming() { [native code] }
compileStreaming value after: replaced
instantiate writable: true
instantiate configurable: true
instantiate enumerable: true
instantiate value before: function instantiate() { [native code] }
instantiate value after: replaced
instantiateStreaming writable: true
instantiateStreaming configurable: true
instantiateStreaming enumerable: true
instantiateStreaming value before: function instantiateStreaming() { [native code] }
instantiateStreaming value after: replaced
CompileError writable: true
CompileError configurable: true
CompileError enumerable: false