Bug 647557 - Uninitialized variable transitionType in History::UpdatePlaces; r=sdwilsh
authorMs2ger <ms2ger@gmail.com>
Wed, 06 Apr 2011 11:31:06 -0700
changeset 67585 ab125def19aef5b2fde772ad266a2bce401643d1
parent 67584 8649c416eb531c1b6676e1d336ee6f68493b7a18
child 67586 6ed8cbde3273c1686484aa07d622d900160ffa94
push idunknown
push userunknown
push dateunknown
reviewerssdwilsh
bugs647557
milestone2.2a1pre
Bug 647557 - Uninitialized variable transitionType in History::UpdatePlaces; r=sdwilsh
toolkit/components/places/History.cpp
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -1904,17 +1904,17 @@ History::UpdatePlaces(const jsval& aPlac
 
       VisitData& data = *visitData.AppendElement(VisitData(uri));
       data.title = title;
       data.guid = guid;
 
       // We must have a date and a transaction type!
       rv = GetIntFromJSObject(aCtx, visit, "visitDate", &data.visitTime);
       NS_ENSURE_SUCCESS(rv, rv);
-      PRUint32 transitionType;
+      PRUint32 transitionType = 0;
       rv = GetIntFromJSObject(aCtx, visit, "transitionType", &transitionType);
       NS_ENSURE_SUCCESS(rv, rv);
       NS_ENSURE_ARG_RANGE(transitionType,
                           nsINavHistoryService::TRANSITION_LINK,
                           nsINavHistoryService::TRANSITION_FRAMED_LINK);
       data.SetTransitionType(transitionType);
 
       // If the visit is an embed visit, we do not actually add it to the