Bug 1278452 - Avoid a possible null deref in netwerk/base/. r=valentin.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 07 Jun 2016 15:07:54 +1000
changeset 301027 d57948ecf695801b2950dd70c3340e91440102bc
parent 301026 42ff71805e2b67d5dabcd6b49ff0f737074bb91b
child 301028 ac0df3cacb3bf8356a9c9ca15c803b512b7de12e
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1278452
milestone50.0a1
Bug 1278452 - Avoid a possible null deref in netwerk/base/. r=valentin.
netwerk/base/nsSocketTransportService2.cpp
--- a/netwerk/base/nsSocketTransportService2.cpp
+++ b/netwerk/base/nsSocketTransportService2.cpp
@@ -1141,17 +1141,17 @@ nsSocketTransportService::DoPollIteratio
                 // new pollable event.  If that fails, we fall back
                 // on "busy wait".
                 NS_WARNING("Trying to repair mPollableEvent");
                 mPollableEvent.reset(new PollableEvent());
                 if (!mPollableEvent->Valid()) {
                     mPollableEvent = nullptr;
                 }
                 SOCKET_LOG(("running socket transport thread without "
-                            "a pollable event now valid=%d", mPollableEvent->Valid()));
+                            "a pollable event now valid=%d", !!mPollableEvent));
                 mPollList[0].fd = mPollableEvent ? mPollableEvent->PollableFD() : nullptr;
                 mPollList[0].in_flags = PR_POLL_READ | PR_POLL_EXCEPT;
                 mPollList[0].out_flags = 0;
             }
         }
     }
 
     return NS_OK;