mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
af281df032
nsCOMArray currently casts a function that takes two `void` pointers into a function that takes two `nsISupports` pointers. UBSAN doesn't like this. This commit introduces an extra level of casting machinery. As a result, each comparison done while sorting goes through an extra level, to get from `(T*, T*)` comparisons to `(nsISupports*, nsISupports*)` comparisons to `(void*, void*)` comparisons, as required by `NS_QuickSort()`. It's a bit annoying but I can't see how else to solve this within the constraint imposed by the existing `nsCOMArray_base`/`nsCOMArray` split. Differential Revision: https://phabricator.services.mozilla.com/D51223 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in | ||
xpcom-private.h.in |