Bug 1508180 - Use uppercase macro names in mfbt/RecordReplay.h r=bhackett
authorTed Campbell <tcampbell@mozilla.com>
Mon, 19 Nov 2018 18:52:49 +0000
changeset 503463 b4ac72eabda04e933eea9b0e9a35fa4f8c786c7d
parent 503462 b020ea6c58e52c8ba94f92f5f52236d4cd74fa1a
child 503464 ffed3e5978105c9f71fd4a5579746e2117ebc819
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1508180
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508180 - Use uppercase macro names in mfbt/RecordReplay.h r=bhackett Rename MOZ_MakeRecordReplayWrapper to MOZ_MAKE_RECORD_REPLAY_WRAPPER so that clang-format doesn't mangle code. Differential Revision: https://phabricator.services.mozilla.com/D12233
mfbt/RecordReplay.h
--- a/mfbt/RecordReplay.h
+++ b/mfbt/RecordReplay.h
@@ -368,86 +368,86 @@ NoteContentParse16(const void* aToken,
 
 ///////////////////////////////////////////////////////////////////////////////
 // API inline function implementation
 ///////////////////////////////////////////////////////////////////////////////
 
 // Define inline wrappers on builds where recording/replaying is enabled.
 #if defined(XP_MACOSX) && defined(NIGHTLY_BUILD)
 
-#define MOZ_MakeRecordReplayWrapperVoid(aName, aFormals, aActuals)      \
+#define MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(aName, aFormals, aActuals)  \
   MFBT_API void Internal ##aName aFormals;                              \
   static inline void aName aFormals                                     \
   {                                                                     \
     if (IsRecordingOrReplaying()) {                                     \
       Internal ##aName aActuals;                                        \
     }                                                                   \
   }
 
-#define MOZ_MakeRecordReplayWrapper(aName, aReturnType, aDefaultValue, aFormals, aActuals) \
+#define MOZ_MAKE_RECORD_REPLAY_WRAPPER(aName, aReturnType, aDefaultValue, aFormals, aActuals) \
   MFBT_API aReturnType Internal ##aName aFormals;                       \
   static inline aReturnType aName aFormals                              \
   {                                                                     \
     if (IsRecordingOrReplaying()) {                                     \
       return Internal ##aName aActuals;                                 \
     }                                                                   \
     return aDefaultValue;                                               \
   }
 
 // Define inline wrappers on other builds. Avoiding references to the out of
 // line method avoids link errors when e.g. using Atomic<> but not linking
 // against MFBT.
 #else
 
-#define MOZ_MakeRecordReplayWrapperVoid(aName, aFormals, aActuals)      \
+#define MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(aName, aFormals, aActuals)  \
   static inline void aName aFormals {}
 
-#define MOZ_MakeRecordReplayWrapper(aName, aReturnType, aDefaultValue, aFormals, aActuals) \
+#define MOZ_MAKE_RECORD_REPLAY_WRAPPER(aName, aReturnType, aDefaultValue, aFormals, aActuals) \
   static inline aReturnType aName aFormals { return aDefaultValue; }
 
 #endif
 
-MOZ_MakeRecordReplayWrapperVoid(BeginOrderedAtomicAccess, (const void* aValue), (aValue))
-MOZ_MakeRecordReplayWrapperVoid(EndOrderedAtomicAccess, (), ())
-MOZ_MakeRecordReplayWrapperVoid(BeginPassThroughThreadEvents, (), ())
-MOZ_MakeRecordReplayWrapperVoid(EndPassThroughThreadEvents, (), ())
-MOZ_MakeRecordReplayWrapper(AreThreadEventsPassedThrough, bool, false, (), ())
-MOZ_MakeRecordReplayWrapperVoid(BeginDisallowThreadEvents, (), ())
-MOZ_MakeRecordReplayWrapperVoid(EndDisallowThreadEvents, (), ())
-MOZ_MakeRecordReplayWrapper(AreThreadEventsDisallowed, bool, false, (), ())
-MOZ_MakeRecordReplayWrapper(RecordReplayValue, size_t, aValue, (size_t aValue), (aValue))
-MOZ_MakeRecordReplayWrapperVoid(RecordReplayBytes, (void* aData, size_t aSize), (aData, aSize))
-MOZ_MakeRecordReplayWrapper(HasDivergedFromRecording, bool, false, (), ())
-MOZ_MakeRecordReplayWrapper(GeneratePLDHashTableCallbacks,
-                            const PLDHashTableOps*, aOps, (const PLDHashTableOps* aOps), (aOps))
-MOZ_MakeRecordReplayWrapper(UnwrapPLDHashTableCallbacks,
-                            const PLDHashTableOps*, aOps, (const PLDHashTableOps* aOps), (aOps))
-MOZ_MakeRecordReplayWrapperVoid(DestroyPLDHashTableCallbacks,
-                                (const PLDHashTableOps* aOps), (aOps))
-MOZ_MakeRecordReplayWrapperVoid(MovePLDHashTableContents,
-                                (const PLDHashTableOps* aFirstOps,
-                                 const PLDHashTableOps* aSecondOps),
-                                (aFirstOps, aSecondOps))
-MOZ_MakeRecordReplayWrapperVoid(InvalidateRecording, (const char* aWhy), (aWhy))
-MOZ_MakeRecordReplayWrapperVoid(RegisterWeakPointer,
-                                (const void* aPtr, const std::function<void(bool)>& aCallback),
-                                (aPtr, aCallback))
-MOZ_MakeRecordReplayWrapperVoid(UnregisterWeakPointer, (const void* aPtr), (aPtr))
-MOZ_MakeRecordReplayWrapperVoid(WeakPointerAccess,
-                                (const void* aPtr, bool aSuccess), (aPtr, aSuccess))
-MOZ_MakeRecordReplayWrapperVoid(RecordReplayAssertBytes,
-                                (const void* aData, size_t aSize), (aData, aSize))
-MOZ_MakeRecordReplayWrapperVoid(RegisterThing, (void* aThing), (aThing))
-MOZ_MakeRecordReplayWrapperVoid(UnregisterThing, (void* aThing), (aThing))
-MOZ_MakeRecordReplayWrapper(ThingIndex, size_t, 0, (void* aThing), (aThing))
-MOZ_MakeRecordReplayWrapper(VirtualThingName, const char*, nullptr, (void* aThing), (aThing))
-MOZ_MakeRecordReplayWrapperVoid(RecordReplayDirective, (long aDirective), (aDirective))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(BeginOrderedAtomicAccess, (const void* aValue), (aValue))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(EndOrderedAtomicAccess, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(BeginPassThroughThreadEvents, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(EndPassThroughThreadEvents, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(AreThreadEventsPassedThrough, bool, false, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(BeginDisallowThreadEvents, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(EndDisallowThreadEvents, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(AreThreadEventsDisallowed, bool, false, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(RecordReplayValue, size_t, aValue, (size_t aValue), (aValue))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RecordReplayBytes, (void* aData, size_t aSize), (aData, aSize))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(HasDivergedFromRecording, bool, false, (), ())
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(GeneratePLDHashTableCallbacks,
+                               const PLDHashTableOps*, aOps, (const PLDHashTableOps* aOps), (aOps))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(UnwrapPLDHashTableCallbacks,
+                               const PLDHashTableOps*, aOps, (const PLDHashTableOps* aOps), (aOps))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(DestroyPLDHashTableCallbacks,
+                                   (const PLDHashTableOps* aOps), (aOps))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(MovePLDHashTableContents,
+                                   (const PLDHashTableOps* aFirstOps,
+                                    const PLDHashTableOps* aSecondOps),
+                                   (aFirstOps, aSecondOps))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(InvalidateRecording, (const char* aWhy), (aWhy))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RegisterWeakPointer,
+                                   (const void* aPtr, const std::function<void(bool)>& aCallback),
+                                   (aPtr, aCallback))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(UnregisterWeakPointer, (const void* aPtr), (aPtr))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(WeakPointerAccess,
+                                   (const void* aPtr, bool aSuccess), (aPtr, aSuccess))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RecordReplayAssertBytes,
+                                   (const void* aData, size_t aSize), (aData, aSize))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RegisterThing, (void* aThing), (aThing))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(UnregisterThing, (void* aThing), (aThing))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(ThingIndex, size_t, 0, (void* aThing), (aThing))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER(VirtualThingName, const char*, nullptr, (void* aThing), (aThing))
+MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RecordReplayDirective, (long aDirective), (aDirective))
 
-#undef MOZ_MakeRecordReplayWrapperVoid
-#undef MOZ_MakeRecordReplayWrapper
+#undef MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID
+#undef MOZ_MAKERECORDREPLAYWRAPPER
 
 MFBT_API void InternalRecordReplayAssert(const char* aFormat, va_list aArgs);
 
 static inline void
 RecordReplayAssert(const char* aFormat, ...)
 {
   if (IsRecordingOrReplaying()) {
     va_list ap;