gecko-dev/xpcom
Aaron Klotz a2b73b8abc Bug 1570395: Add StaticLocalAutoPtr and StaticLocalRefPtr to XPCOM; r=froydnj
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
2019-08-02 17:26:37 +00:00
..
base Bug 1570395: Add StaticLocalAutoPtr and StaticLocalRefPtr to XPCOM; r=froydnj 2019-08-02 17:26:37 +00:00
build Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld 2019-06-21 01:33:47 +00:00
components Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2019-07-08 17:27:36 +00:00
doc
ds Bug 1570719 - Skip more elements in spellcheck for MailNews. r=masayuki 2019-08-02 10:49:17 +02:00
glue Bug 1554380 - Fix some issues in mozilla::ReadAhead. r=aklotz 2019-05-29 10:13:28 +00:00
idl-parser Bug 1567739 - Stop using deprecated rust libc integer types in xpidl. r=froydnj 2019-07-23 13:42:44 +00:00
io Bug 1561912, r=michal 2019-07-26 22:58:39 +00:00
libxpt/xptcall
reflect Bug 1566814 - nsXPTCStubBase::Stub##n functions shouldn't be build with stack-protector in nxptcstubs_sparc64_openbsd.cpp r=froydnj 2019-07-24 09:54:10 +00:00
rust Bug 1567739 - Stop using deprecated rust libc integer types in xpidl. r=froydnj 2019-07-23 13:42:44 +00:00
string Bug 1543693 - Add missing nsReadableUtils wrappers for conversions between UTF-8 and Latin1 XPCOM string. r=froydnj 2019-04-12 17:49:11 +00:00
system Bug 1553558 - collect countryCode in system info off the main thread. r=mconley,Standard8 2019-08-02 12:55:38 +00:00
tests Bug 1298602 - split condition in TestExpirationTracker; r=KrisWright 2019-07-31 18:16:35 +00:00
threads Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
windbgdlg Bug 1528651 - Fix some trivial warnings and re-enable warnings-as-errors on Windows in some directories. r=dmajor 2019-02-19 20:42:11 +09:00
xpidl
moz.build
xpcom-config.h.in Bug 1523851 - Remove the dynamic_cast<void*> test. r=froydnj 2019-01-30 14:25:33 +00:00
xpcom-private.h.in