Bug 1302591 - Fix compile Wmaybe-uninitialized warning on WebVTTListener.cpp. r=rillian
authorJames Cheng <jacheng@mozilla.com>
Wed, 14 Sep 2016 10:16:34 +0800
changeset 314249 1c708062f8705e9ff1fb1689c9d47b90228a7344
parent 314248 ee5d5cea6137c8ed6b4e706ac64a7c345ea1ad9b
child 314250 53afd8b15130a1ab47f360adff89e01914e895d4
push id30713
push userkwierso@gmail.com
push dateFri, 16 Sep 2016 21:32:12 +0000
treeherdermozilla-central@b401cb17167b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1302591
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 1302591 - Fix compile Wmaybe-uninitialized warning on WebVTTListener.cpp. r=rillian MozReview-Commit-ID: BAMUvll1p1n
dom/media/WebVTTListener.cpp
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -155,17 +155,17 @@ WebVTTListener::OnDataAvailable(nsIReque
 
 NS_IMETHODIMP
 WebVTTListener::OnCue(JS::Handle<JS::Value> aCue, JSContext* aCx)
 {
   if (!aCue.isObject()) {
     return NS_ERROR_FAILURE;
   }
 
-  TextTrackCue* cue;
+  TextTrackCue* cue = nullptr;
   nsresult rv = UNWRAP_OBJECT(VTTCue, &aCue.toObject(), cue);
   NS_ENSURE_SUCCESS(rv, rv);
 
   cue->SetTrackElement(mElement);
   mElement->mTrack->AddCue(*cue);
 
   return NS_OK;
 }