Bug 786727: synchronize on m_spinlock in SystemOOMEvent (r=printezi).
authorFelix Klock II <fklockii@adobe.com>
Thu, 30 Aug 2012 06:22:39 -0700
changeset 7537 e0e2fbe3381cfb1bf5f20f08b583191e2f5acad7
parent 7536 029e4b60bcf39e4edd199ad471b37c1350e2c827
child 7538 73cd547535966365fb984cf4ea5eb0d4c0ddd789
push id4257
push userdschaffe@adobe.com
push dateThu, 06 Sep 2012 14:36:05 +0000
reviewersprintezi
bugs786727, 1106739
Bug 786727: synchronize on m_spinlock in SystemOOMEvent (r=printezi). CL@1106739
MMgc/GCHeap.cpp
--- a/MMgc/GCHeap.cpp
+++ b/MMgc/GCHeap.cpp
@@ -2491,16 +2491,17 @@ namespace MMgc
         GCHeap *heap = GCHeap::GetGCHeap();
         GCAssertMsg(heap->GetEnterFrame() == m_ef, "EnterFrame's not unwound properly");
         if(heap->GetStatus() == kMemAbort)
             heap->Abort();
     }
 
     void GCHeap::SystemOOMEvent(size_t size, int attempt)
     {
+        MMGC_LOCK(m_spinlock);
         if (attempt == 0 && !statusNotificationBeingSent())
             SendFreeMemorySignal(size/kBlockSize + 1);
         else
             Abort();
     }
 
     /*static*/
     void GCHeap::SignalObjectTooLarge()