Bug 1453525 - Remove OOM check of infallible method. r=mccr8
authorEric Rahm <erahm@mozilla.com>
Wed, 11 Apr 2018 17:09:55 -0700
changeset 416142 ba50d50797ede3964b69eb1f52d48937b7ea92a8
parent 416141 e5425430461fca727ca0bfab0261248a15f6fd44
child 416143 315e0039f7e475c8a67f743cff7ef8804946f13f
push id33917
push userapavel@mozilla.com
push dateSat, 28 Apr 2018 17:30:55 +0000
treeherdermozilla-central@08f68e2c892c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1453525
milestone61.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 1453525 - Remove OOM check of infallible method. r=mccr8
dom/base/EventSource.cpp
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -1449,21 +1449,17 @@ EventSourceImpl::DispatchCurrentMessageE
   if (message->mEventName.IsEmpty()) {
     message->mEventName.AssignLiteral("message");
   }
 
   if (message->mLastEventID.IsEmpty() && !mLastEventID.IsEmpty()) {
     message->mLastEventID.Assign(mLastEventID);
   }
 
-  size_t sizeBefore = mMessagesToDispatch.GetSize();
   mMessagesToDispatch.Push(message.release());
-  NS_ENSURE_TRUE(mMessagesToDispatch.GetSize() == sizeBefore + 1,
-                 NS_ERROR_OUT_OF_MEMORY);
-
 
   if (!mGoingToDispatchAllMessages) {
     nsCOMPtr<nsIRunnable> event =
       NewRunnableMethod("dom::EventSourceImpl::DispatchAllMessageEvents",
                         this,
                         &EventSourceImpl::DispatchAllMessageEvents);
     NS_ENSURE_STATE(event);