Bug 1499473: Simplify TabGroup a bit, now that ThrottledEventQueue::Create is infallible. r=smaug
authorJim Blandy <jimb@mozilla.com>
Wed, 17 Oct 2018 20:41:59 +0000
changeset 497565 1249680014b0b4faf9eed339f9716755322bb33d
parent 497564 b77bde54527692f87c31a60112d3cb57ec13298e
child 497566 f6404da759c5d8834f367bde898dd1fcd54fc904
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)
reviewerssmaug
bugs1499473
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 1499473: Simplify TabGroup a bit, now that ThrottledEventQueue::Create is infallible. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D8915
dom/base/TabGroup.cpp
--- a/dom/base/TabGroup.cpp
+++ b/dom/base/TabGroup.cpp
@@ -80,22 +80,17 @@ TabGroup::EnsureThrottledEventQueues()
     return;
   }
 
   mThrottledQueuesInitialized = true;
 
   for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
     TaskCategory category = static_cast<TaskCategory>(i);
     if (category == TaskCategory::Worker || category == TaskCategory::Timer) {
-      nsCOMPtr<nsISerialEventTarget> target = ThrottledEventQueue::Create(mEventTargets[i]);
-      if (target) {
-        // This may return nullptr during xpcom shutdown.  This is ok as we
-        // do not guarantee a ThrottledEventQueue will be present.
-        mEventTargets[i] = target;
-      }
+      mEventTargets[i] = ThrottledEventQueue::Create(mEventTargets[i]);
     }
   }
 }
 
 /* static */ TabGroup*
 TabGroup::GetChromeTabGroup()
 {
   if (!sChromeTabGroup) {