mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
a2b73b8abc
This patch adds smart pointers to be used for initializing objects as C++11 "magic statics" -- that is, they are able to take advantage of C++11's guarantee of thread safety during initialization by atomically constructing both the smart pointer itself as well as the object being pointed to. Unlike Static{Auto,Ref}Ptr, they have non-trivial constructors, though they must still have trivial destructors to prevent emission of atexit calls. The new classes use the new `MOZ_STATIC_LOCAL_CLASS` annotation which ensures their instantiations are static locals and prevents non-trivial destructors. Differential Revision: https://phabricator.services.mozilla.com/D40092 --HG-- rename : xpcom/base/StaticPtr.h => xpcom/base/StaticLocalPtr.h extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in | ||
xpcom-private.h.in |