Bug 1366996 - Fix uninitialized members in nsUrlClassifierInfo. r=francois
authorDimiL <dlee@mozilla.com>
Wed, 31 May 2017 08:52:34 +0800
changeset 409548 849d721f917387f8178641460d6c94f1ac5634d9
parent 409547 26a25602688a35b1025951a1caee12ccdbb1679d
child 409549 04c6a723dddcdb76456b8c58a90445d6ea490fe7
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1366996, 1409773, 1409774
milestone55.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 1366996 - Fix uninitialized members in nsUrlClassifierInfo. r=francois This was found by Coverity Scan (CID 1409773, 1409774). MozReview-Commit-ID: LA7oPMobbie
toolkit/components/url-classifier/nsUrlClassifierInfo.cpp
--- a/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsUrlClassifierInfo.h"
 
 NS_IMPL_ISUPPORTS(nsUrlClassifierPositiveCacheEntry,
                   nsIUrlClassifierPositiveCacheEntry)
 
 nsUrlClassifierPositiveCacheEntry::nsUrlClassifierPositiveCacheEntry()
+  : expirySec(-1)
 {
 }
 
 NS_IMETHODIMP
 nsUrlClassifierPositiveCacheEntry::GetExpiry(int64_t* aExpiry)
 {
   if (!aExpiry) {
     return NS_ERROR_NULL_POINTER;
@@ -28,16 +29,17 @@ nsUrlClassifierPositiveCacheEntry::GetFu
   aFullHash = fullhash;
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS(nsUrlClassifierCacheEntry,
                   nsIUrlClassifierCacheEntry)
 
 nsUrlClassifierCacheEntry::nsUrlClassifierCacheEntry()
+  : expirySec(-1)
 {
 }
 
 NS_IMETHODIMP
 nsUrlClassifierCacheEntry::GetPrefix(nsACString& aPrefix)
 {
   aPrefix = prefix;
   return NS_OK;