Bug 1499462: Remove dead failure handling and comments from ThrottledEventQueue::Create. r=froydnj
authorJim Blandy <jimb@mozilla.com>
Tue, 16 Oct 2018 21:24:48 +0000
changeset 497274 e85db490e17a596a40eb8bc2a3d2787a77c41d50
parent 497273 8fee7620570b941294f056eab7fa220cc531669c
child 497275 6dad1580bc3ea76a5239ef86a78e82745f197f5a
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1499462
milestone64.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 1499462: Remove dead failure handling and comments from ThrottledEventQueue::Create. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D8890
xpcom/threads/ThrottledEventQueue.cpp
xpcom/threads/ThrottledEventQueue.h
--- a/xpcom/threads/ThrottledEventQueue.cpp
+++ b/xpcom/threads/ThrottledEventQueue.cpp
@@ -303,19 +303,16 @@ ThrottledEventQueue::ThrottledEventQueue
 
 already_AddRefed<ThrottledEventQueue>
 ThrottledEventQueue::Create(nsISerialEventTarget* aBaseTarget)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aBaseTarget);
 
   RefPtr<Inner> inner = Inner::Create(aBaseTarget);
-  if (NS_WARN_IF(!inner)) {
-    return nullptr;
-  }
 
   RefPtr<ThrottledEventQueue> ref =
     new ThrottledEventQueue(inner.forget());
   return ref.forget();
 }
 
 bool
 ThrottledEventQueue::IsEmpty() const
--- a/xpcom/threads/ThrottledEventQueue.h
+++ b/xpcom/threads/ThrottledEventQueue.h
@@ -59,18 +59,17 @@ class ThrottledEventQueue final : public
 {
   class Inner;
   RefPtr<Inner> mInner;
 
   explicit ThrottledEventQueue(already_AddRefed<Inner> aInner);
   ~ThrottledEventQueue() = default;
 
 public:
-  // Attempt to create a ThrottledEventQueue for the given target.  This
-  // may return nullptr if the browser is already shutting down.
+  // Create a ThrottledEventQueue for the given target.
   static already_AddRefed<ThrottledEventQueue>
   Create(nsISerialEventTarget* aBaseTarget);
 
   // Determine if there are any events pending in the queue.
   bool IsEmpty() const;
 
   // Determine how many events are pending in the queue.
   uint32_t Length() const;