зеркало из https://github.com/mozilla/gecko-dev.git
4c9a0dab80
Previously this stored a function pointer to do the tracing along with the rooted thing. The patch changes this to use a virtual method for the tracing. Calling the method on the base class means we don't need to do address arithmetic to find wher the trace function is stored and we don't need the alignment restrictions, because the virtual trace method knows the layout of its class. I had to add a traits class, mainly to get the address of the rooted thing inside the wrapper since we need to be able to get the address of the wrapper itself now for tracing. The wrapper class is renamed from DispatchWrapper to RootedTraceable. Differential Revision: https://phabricator.services.mozilla.com/D73421 |
||
---|---|---|
.. | ||
wrapper.hpp |