Closed Bug 500750 Opened 15 years ago Closed 15 years ago

mDBConn is not set to NULL in release builds

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Details

Attachments

(1 file)

Attached patch v1.0Splinter Review
Because we have a non-braced if statement for an NS_ERROR statement, mDBConn is not set to NULL in release builds.
Attachment #385437 - Flags: review?(bugmail)
Whiteboard: [needs review asuth]
Comment on attachment 385437 [details] [diff] [review]
v1.0

>diff --git a/storage/src/mozStorageConnection.cpp b/storage/src/mozStorageConnection.cpp
>   int srv = ::sqlite3_close(mDBConn);
>-  if (srv != SQLITE_OK)
>-    NS_ERROR("sqlite3_close failed. There are probably outstanding statements that are listed above!");
>+  NS_ASSERTION(src == SQLITE_OK,
                   ^

c != v

r=asuth with that fixed.
Attachment #385437 - Flags: review?(bugmail) → review+
Whoops - had a build going so I couldn't test-compile.
Whiteboard: [needs review asuth]
http://hg.mozilla.org/mozilla-central/rev/37fd13fb79cf
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: