gecko-dev/js/xpconnect
Kris Maglione 0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
..
crashtests Bug 1446668: Remove setUserData crashtests. r=smaug 2018-03-18 01:53:13 +01:00
idl Bug 1465728 part 3 - Rename Cu.getCompartmentLocation to Cu.getRealmLocation. r=bz 2018-06-06 11:44:17 +02:00
loader Bug 1463587: Part 2 - Add a shared-memory structured clone key-value store. r=erahm,bz 2018-06-22 20:35:49 -07:00
public Bug 1453011 - Remove PostCreatePrototype. r=bz. 2018-03-22 11:31:05 +01:00
shell bug 1255485 - Remove NSDISTMODE=copy from Makefiles. r=nalexander 2017-11-22 15:30:06 -05:00
src Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn 2018-07-06 12:24:41 -07:00
tests Bug 1447856 - Make the watchdog tests actually wait for completion. r=arai 2018-07-07 07:20:50 +00:00
wrappers Bug 1473865 part 4 - Use xpc::WindowOrNull instead of xpc::WindowGlobalOrNull in a few places. r=bz 2018-07-12 16:17:44 +02:00
moz.build