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 313056 bfe117203e0cf267f180e0710b06e8425b99515f
parent 313055 5ad42aa79b3dbbfd54b54a4b2368d0677d01206d
child 313057 1aa180309dacc3f0f8fe622839b86ef405ef0d99
push id30669
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 00:56:12 +0000
treeherdermozilla-central@77940cbf0c2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1301032
milestone51.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 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;