Bug 1019162 - fix a -Wmaybe-uninitialized build warning in nsDOMWindowUtils.cpp; r=smaug
authorNathan Froyd <froydnj@mozilla.com>
Mon, 02 Jun 2014 15:05:53 -0400
changeset 186594 a063f04aa7e8aee7a3869cf02e07b7114160fd4d
parent 186593 9b1fabd016b5a7b7b50e7e1761417063eef44347
child 186595 4cc3b00d4ece49b0f34e19cd6f317631e27e6dab
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs1019162
milestone32.0a1
Bug 1019162 - fix a -Wmaybe-uninitialized build warning in nsDOMWindowUtils.cpp; r=smaug
dom/base/nsDOMWindowUtils.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -3020,17 +3020,17 @@ NS_IMETHODIMP
 nsDOMWindowUtils::GetFileId(JS::Handle<JS::Value> aFile, JSContext* aCx,
                             int64_t* aResult)
 {
   MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
 
   if (!aFile.isPrimitive()) {
     JSObject* obj = aFile.toObjectOrNull();
 
-    FileHandle* fileHandle;
+    FileHandle* fileHandle = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(FileHandle, obj, fileHandle))) {
       *aResult = fileHandle->GetFileId();
       return NS_OK;
     }
 
     nsISupports* nativeObj =
       nsContentUtils::XPConnect()->GetNativeOfWrapper(aCx, obj);