gecko-dev/xpcom
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
..
base Bug 1410460 - Non-unified build fix for nsClassInfoImpl.cpp. r=cpearce 2017-10-20 16:46:40 +01:00
build Bug 1407458 - Use nsString for Observation filenames. r=erahm. 2017-10-17 08:22:12 +11:00
components Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj. 2017-10-18 13:17:26 +11:00
doc
ds Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj. 2017-10-22 08:50:25 +11:00
glue Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium 2017-09-11 11:33:26 -07:00
idl-parser Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj 2017-09-12 15:03:14 -07:00
io Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj. 2017-10-22 08:50:25 +11:00
libxpt/xptcall Bug 1403959, part 2 - Automatically generated eslint fixes. r=froydnj 2017-09-28 15:49:04 -07:00
reflect Bug 1409227 (part 4) - Replace nsMemory::Clone(id, sizeof(nsID)) with nsID::Clone(id). r=mccr8. 2017-10-18 10:39:20 +11:00
rust Bug 1377351 - Part 3: Expose nsA[C]String::Assign(nsA[C]String&&) overload as take_from to rust, r=froydnj 2017-10-18 13:00:15 -04:00
string Bug 1403083 - Part 1: Properly disable string functions for invalid char types. r=froydnj 2017-10-03 12:44:44 -07:00
system Bug 1406212 - Remove multiprocessBlockPolicy. r=Felipe 2017-10-12 11:16:46 -07:00
tests Bug 1403083 - Part 2: Test conditionaly enabling string functions. r=froydnj 2017-10-09 13:33:16 -07:00
threads Bug 1410023 - Non-unified build fixes for xpcom/threads. r=froydnj 2017-10-20 17:36:29 +01:00
typelib Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
windbgdlg
xpidl Bug 1390916 - Always use --track instead of --no-remove for install manifests; r=gps 2017-08-08 17:07:07 -04:00
moz.build
xpcom-config.h.in
xpcom-private.h.in