Bug 1478293 - Mark RecordReplayInterceptObjCMessage as used. r?froydnj draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 26 Jul 2018 11:10:40 +0900
changeset 822837 00817081814fc91afb5ab0906561e81cb8911542
parent 822234 dd386b5b9fa7f5cd6dc4bbbfa0503b3eb2969af5
push id117481
push userbmo:mh+mozilla@glandium.org
push dateThu, 26 Jul 2018 02:11:57 +0000
reviewersfroydnj
bugs1478293
milestone63.0a1
Bug 1478293 - Mark RecordReplayInterceptObjCMessage as used. r?froydnj So that LTO doesn't eliminate it, leaving the assembly from RR_objc_msgSend unable to find it.
toolkit/recordreplay/ProcessRedirectDarwin.cpp
--- a/toolkit/recordreplay/ProcessRedirectDarwin.cpp
+++ b/toolkit/recordreplay/ProcessRedirectDarwin.cpp
@@ -1683,17 +1683,17 @@ struct NSFastEnumerationState
 };
 
 // Emulation of NSFastEnumeration on arrays does not replay any exceptions
 // thrown by mutating the array while it is being iterated over.
 static unsigned long gNeverChange;
 
 extern "C" {
 
-size_t
+size_t __attribute__((used))
 RecordReplayInterceptObjCMessage(MessageArguments* aArguments)
 {
   if (AreThreadEventsPassedThrough()) {
     aArguments->scratch = (size_t) OriginalFunction(CallEvent_objc_msgSend);
     return 1;
   }
   EnsureNotDivergedFromRecording();