gecko-dev/xpcom
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
..
base Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn 2018-07-06 12:24:41 -07:00
build Bug 1475177 - Change sendCommand xpcshell function to only accept plain JSFunction callbacks. r=evilpie 2018-07-16 14:02:16 +02:00
components Bug 1471685 - Work around MSVC linker adding padding during incremental builds. r=froydnj 2018-06-28 15:53:25 +09:00
doc
ds Bug 1475980: A moved table should be empty. r=froydnj 2018-07-16 18:06:37 +02:00
glue Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE 2018-05-30 19:03:50 +03:00
idl-parser Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt 2018-06-27 11:10:02 -04:00
io Bug 1412081 - Add ability to blacklist file paths on Unix platforms r=mayhemer 2018-06-20 02:52:12 +02:00
libxpt/xptcall
reflect Bug 1470325 - Update Codegen.py to emit Foo_Binding instead of FooBinding. - r=bz,qdot 2018-06-26 17:05:01 -07:00
rust Bug 1453551 - Don't use i8 as c_char in xpcom-gtest. r=mystor 2018-04-12 15:28:08 +09:00
string Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
system Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE 2018-05-30 19:03:50 +03:00
tests Bug 1475980: A moved table should be empty. r=froydnj 2018-07-16 18:06:37 +02:00
threads Bug 1472668 - Don't reset performance counters when reading their values - r=baku 2018-07-10 10:06:41 +02:00
typelib Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt 2018-06-27 11:10:02 -04:00
windbgdlg
xpidl Bug 1459721 - part 7 - remove dist_idl install manifest; r=chmanchester 2018-05-15 10:05:23 -04:00
moz.build Bug 1444745 - Part 1: Clear out xptinfo and typelib to make way for the this patch, r=mccr8 2018-04-17 19:20:50 -04:00
xpcom-config.h.in
xpcom-private.h.in