Bug 1301032 - Remove a warning when Console.cpp is compiled, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 07 Sep 2016 18:08:23 +0200
changeset 313031 bfe117203e0cf267f180e0710b06e8425b99515f
parent 313030 5ad42aa79b3dbbfd54b54a4b2368d0677d01206d
child 313032 1aa180309dacc3f0f8fe622839b86ef405ef0d99
push id20479
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 01:08:46 +0000
treeherderfx-team@fb7c6b034329 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1301032
milestone51.0a1
Bug 1301032 - Remove a warning when Console.cpp is compiled, r=smaug
dom/console/Console.cpp
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1995,17 +1995,17 @@ Console::StartTimer(JSContext* aCx, cons
     return false;
   }
 
   nsAutoJSString label;
   if (NS_WARN_IF(!label.init(aCx, jsString))) {
     return false;
   }
 
-  DOMHighResTimeStamp entry;
+  DOMHighResTimeStamp entry = 0;
   if (!mTimerRegistry.Get(label, &entry)) {
     mTimerRegistry.Put(label, aTimestamp);
   } else {
     aTimestamp = entry;
   }
 
   aTimerLabel = label;
   *aTimerValue = aTimestamp;
@@ -2058,17 +2058,17 @@ Console::StopTimer(JSContext* aCx, const
     return false;
   }
 
   nsAutoJSString key;
   if (NS_WARN_IF(!key.init(aCx, jsString))) {
     return false;
   }
 
-  DOMHighResTimeStamp entry;
+  DOMHighResTimeStamp entry = 0;
   if (NS_WARN_IF(!mTimerRegistry.Get(key, &entry))) {
     return false;
   }
 
   mTimerRegistry.Remove(key);
 
   aTimerLabel = key;
   *aTimerDuration = aTimestamp - entry;