gecko-dev/js
Boris Zbarsky 7e5a37a024 Bug 1521907 part 3. Start using CheckedUnwrapStatic/Dynamic in bindings. r=peterv
The basic idea for the changes around UnwrapObjectInternal and its callers
(UnwrapObject, UNWRAP_OBJECT, etc) is to add a parameter to the guts of the
object-unwrapping code in bindings which can be either a JSContext* or nullptr
(statically typed).  Then we test which type it is and do either a
CheckedUnwrapDynamic or CheckedUnwrapStatic.  Since the type is known at
compile time, there is no actual runtime check; the compiler just emits a call
to the right thing directly (verified by examining the assembly output on
Linux).

The rest of the changes are mostly propagating through that template parameter,
adding static asserts to make sure people don't accidentally pass nullptr while
trying to unwrap to a type that might be a WindowProxy or Location, etc.

There are also some changes to places that were calling CheckedUnwrap directly
to use either the static or dynamic version, as needed.

Differential Revision: https://phabricator.services.mozilla.com/D17883

--HG--
extra : moz-landing-system : lando
2019-02-02 03:23:49 +00:00
..
ductwork/debugger Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
examples No bug. Make jorendb give a REPL even if the script throws an exception. r=NPOAEW 2019-01-08 14:21:25 -08:00
ipc Backed out 7 changesets (bug 1521907) for JSObject Wrapper.cpp bustages and failures CLOSED TREE 2019-02-01 19:38:25 +02:00
public Bug 1521907 part 1. Add a version of CheckedUnwrap that can do a dynamic security check. r=jandem,sfink 2019-02-02 03:22:29 +00:00
rust Bug 1156077 - Remove the non-standard Proxy getPropertyDescriptor trap. r=bzbarsky,jorendorff 2019-01-25 16:41:34 +00:00
src Bug 1521907 part 1. Add a version of CheckedUnwrap that can do a dynamic security check. r=jandem,sfink 2019-02-02 03:22:29 +00:00
xpconnect Bug 1521907 part 3. Start using CheckedUnwrapStatic/Dynamic in bindings. r=peterv 2019-02-02 03:23:49 +00:00
app.mozbuild
ffi.configure Bug 1519040 - Remove some unused old-configure assignments. r=mshal 2019-01-10 22:02:04 +00:00
moz.build
moz.configure Bug 1519319 - Move bindgen.configure include to js/moz.configure. r=froydnj 2019-01-11 22:17:54 +00:00
sub.configure Bug 1520394 - Don't invoke js subconfigure as a separate process. r=nalexander 2019-01-16 23:42:12 +00:00