mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-15 05:00:02 -10:00
The code has been fragile since its introduction in bug 532198, but in practice it (surprisingly) hadn't caused problems so far. What the C++ implementation saves us, albeit at the cost of using undefined behavior, is having to write several different version of the corresponding assembly for the various different ARM variants that are supported (including thumb vs. non-thumb). With this being the first time the compiler breaks this code in 14 years, I'd say it's worth keeping that way. We may reconsider if it breaks further. An alternative way to handle the situation would be to test for paramCount=0 and call `func(that)` in that case, but the compiler generates much more code than necessary for some reason. Differential Revision: https://phabricator.services.mozilla.com/D210984