Bug 1453795 - Storage - Initialize member fields in classes/ structures. r=mak77
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Fri, 15 Jun 2018 10:42:19 +0300
changeset 476901 16a997fcfb0635f170f1858134ccca377a0b82d7
parent 476900 b1fa2cf6ccaeed98689a3b35d3b97adf3181a677
child 476902 85c1c680af293ab3314a203a4bdcf42328954c79
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak77
bugs1453795
milestone62.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 1453795 - Storage - Initialize member fields in classes/ structures. r=mak77
storage/StorageBaseStatementInternal.cpp
storage/mozStorageStatement.cpp
--- a/storage/StorageBaseStatementInternal.cpp
+++ b/storage/StorageBaseStatementInternal.cpp
@@ -106,17 +106,18 @@ private:
   RefPtr<Connection> mConnection;
   sqlite3_stmt *mAsyncStatement;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 //// StorageBaseStatementInternal
 
 StorageBaseStatementInternal::StorageBaseStatementInternal()
-: mAsyncStatement(nullptr)
+: mNativeConnection(nullptr)
+, mAsyncStatement(nullptr)
 {
 }
 
 void
 StorageBaseStatementInternal::asyncFinalize()
 {
   nsIEventTarget *target = mDBConnection->getAsyncExecutionTarget();
   if (target) {
--- a/storage/mozStorageStatement.cpp
+++ b/storage/mozStorageStatement.cpp
@@ -106,16 +106,18 @@ NS_IMPL_QUERY_INTERFACE(StatementClassIn
 static StatementClassInfo sStatementClassInfo;
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Statement
 
 Statement::Statement()
 : StorageBaseStatementInternal()
 , mDBStatement(nullptr)
+, mParamCount(0)
+, mResultColumnCount(0)
 , mColumnNames()
 , mExecuting(false)
 {
 }
 
 nsresult
 Statement::initialize(Connection *aDBConnection,
                       sqlite3 *aNativeConnection,