Bug 1309832 - Remove warning message in nsHostObjectProtocolHandler.cpp, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 13 Oct 2016 13:43:21 +0200
changeset 317863 a84327c7eb976657d30505819dfedb0ba21e8419
parent 317862 49b4e3cb8e7ef37490ab29e3d5446fb932032142
child 317864 3d23af9b271026ef3cdd9854c764d04785e21a06
push id33170
push usercbook@mozilla.com
push dateFri, 14 Oct 2016 10:37:07 +0000
treeherderautoland@0d101ebfd95c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1309832
milestone52.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 1309832 - Remove warning message in nsHostObjectProtocolHandler.cpp, r=smaug
dom/base/nsHostObjectProtocolHandler.cpp
--- a/dom/base/nsHostObjectProtocolHandler.cpp
+++ b/dom/base/nsHostObjectProtocolHandler.cpp
@@ -428,17 +428,19 @@ class ReleasingTimerHolder final : publi
 public:
   NS_DECL_ISUPPORTS
 
   static void
   Create(nsTArray<nsWeakPtr>&& aArray)
   {
     RefPtr<ReleasingTimerHolder> holder = new ReleasingTimerHolder(Move(aArray));
     holder->mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
-    if (NS_WARN_IF(!holder->mTimer)) {
+
+    // If we are shutting down, we are not able to create a timer.
+    if (!holder->mTimer) {
       return;
     }
 
     nsresult rv = holder->mTimer->InitWithCallback(holder, RELEASING_TIMER,
                                                    nsITimer::TYPE_ONE_SHOT);
     NS_ENSURE_SUCCESS_VOID(rv);
   }