Bug 873346 - Fix sometimes-unitialized warning in nsImageMap. r=dbaron
authorReuben Morais <reuben.morais@gmail.com>
Wed, 17 Jul 2013 20:28:23 -0700
changeset 139270 67661dd965761efe0badd4a67c7d98b4baa82646
parent 139269 53891879b3a4377d82fd23cc697421826071afeb
child 139271 7900b47971c79d954bd8eef2be573604e290bf79
push id24983
push userryanvm@gmail.com
push dateSat, 20 Jul 2013 00:51:06 +0000
treeherdermozilla-central@6030c759a502 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs873346
milestone25.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 873346 - Fix sometimes-unitialized warning in nsImageMap. r=dbaron
layout/generic/nsImageMap.cpp
--- a/layout/generic/nsImageMap.cpp
+++ b/layout/generic/nsImageMap.cpp
@@ -823,16 +823,17 @@ nsImageMap::AddArea(nsIContent* aArea)
   case 4:
     area = new DefaultArea(aArea);
     break;
   case 5:
   case 6:
     area = new PolyArea(aArea);
     break;
   default:
+    area = nullptr;
     NS_NOTREACHED("FindAttrValueIn returned an unexpected value.");
     break;
   }
   if (!area)
     return NS_ERROR_OUT_OF_MEMORY;
 
   //Add focus listener to track area focus changes
   aArea->AddSystemEventListener(NS_LITERAL_STRING("focus"), this, false,