Bug 1007850 - Don't reset seer if it's not enabled. r=mcmanus, a=sledru
authorNicholas Hurley <hurley@todesschaf.org>
Thu, 08 May 2014 17:35:59 -0700
changeset 192247 9c27fdffe6f1
parent 192246 7d945895a6d9
child 192248 eb84c3250ae3
push id3542
push userryanvm@gmail.com
push date2014-05-12 13:22 +0000
Treeherderresults
reviewersmcmanus, sledru
bugs1007850
milestone30.0
Bug 1007850 - Don't reset seer if it's not enabled. r=mcmanus, a=sledru
netwerk/base/src/Seer.cpp
--- a/netwerk/base/src/Seer.cpp
+++ b/netwerk/base/src/Seer.cpp
@@ -2294,16 +2294,20 @@ Seer::Reset()
 {
   MOZ_ASSERT(NS_IsMainThread(),
              "Seer interface methods must be called on the main thread");
 
   if (!mInitialized) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
+  if (!mEnabled) {
+    return NS_OK;
+  }
+
   nsRefPtr<SeerResetEvent> event = new SeerResetEvent();
   return mIOThread->Dispatch(event, NS_DISPATCH_NORMAL);
 }
 
 class SeerCleanupEvent : public nsRunnable
 {
 public:
   NS_IMETHOD Run() MOZ_OVERRIDE