Bug 1275184 - Uninitialised value use in nsDocShellTreeOwner. r=smaug.
authorJulian Seward <jseward@acm.org>
Thu, 26 May 2016 14:15:50 +0200
changeset 371343 83a0dff3856c57b1124da4df3d69c535bcdcfd83
parent 371342 581a44c822aa0140a74bbf803b5b3801404d2e22
child 371344 429f5a3ae4badce551053d5697914d710301233e
push id19305
push userbmo:mh+mozilla@glandium.org
push dateThu, 26 May 2016 12:36:52 +0000
reviewerssmaug
bugs1275184
milestone49.0a1
Bug 1275184 - Uninitialised value use in nsDocShellTreeOwner. r=smaug.
embedding/browser/nsDocShellTreeOwner.cpp
--- a/embedding/browser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/nsDocShellTreeOwner.cpp
@@ -1014,17 +1014,17 @@ nsDocShellTreeOwner::HandleEvent(nsIDOME
   }
 
   nsCOMPtr<nsIDroppedLinkHandler> handler =
     do_GetService("@mozilla.org/content/dropped-link-handler;1");
   if (handler) {
     nsAutoString eventType;
     aEvent->GetType(eventType);
     if (eventType.EqualsLiteral("dragover")) {
-      bool canDropLink;
+      bool canDropLink = false;
       handler->CanDropLink(dragEvent, false, &canDropLink);
       if (canDropLink) {
         aEvent->PreventDefault();
       }
     } else if (eventType.EqualsLiteral("drop")) {
       nsIWebNavigation* webnav = static_cast<nsIWebNavigation*>(mWebBrowser);
 
       nsAutoString link, name;