Closed
Bug 1256593
Opened 8 years ago
Closed 8 years ago
[Static Analysis][Logically dead code] In function DatabaseMaintenance::CheckIntegrity
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1355136 )
Attachments
(1 file)
The Static Analysis tool Coverity added that the following code is dead: >>if (foreignKeysWereEnabled) { >> stmtSQL.AppendLiteral("ON"); >>} else { >> stmtSQL.AppendLiteral("OFF"); >>} This code executes only if |changedForeignKeys | is true, when this code gets executed |foreignKeysWereEnabled| cannot be true because of the previous statements: >> if (foreignKeysWereEnabled) { >> changedForeignKeys = false; >> }
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/40053/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/40053/
Attachment #8730630 -
Flags: review?(jonas)
Comment 2•8 years ago
|
||
We don't need two bools, don't we ?
Assignee | ||
Comment 3•8 years ago
|
||
Comment on attachment 8730630 [details] MozReview Request: Bug 1256593 - remvoed dead code. r?sicking Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40053/diff/1-2/
Comment on attachment 8730630 [details] MozReview Request: Bug 1256593 - remvoed dead code. r?sicking Jan, can you take this one? If this code really can't execute, we should check if that's due to a typo, or if the behavior is actually correct.
Attachment #8730630 -
Flags: review?(jonas) → review?(jvarga)
Comment 5•8 years ago
|
||
Comment on attachment 8730630 [details] MozReview Request: Bug 1256593 - remvoed dead code. r?sicking https://reviewboard.mozilla.org/r/40053/#review37401 I believe this patch is correct. We just need to temporarily enable foreign keys for the foreign keys check and if they are already enabled we don't neet to enable/disable them.
Attachment #8730630 -
Flags: review?(jvarga) → review+
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6e8bbbacf474
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•