Closed
Bug 838349
Opened 12 years ago
Closed 12 years ago
bogus use of MOZ_ASSERT
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: MatsPalmgren_bugz, Assigned: mak)
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
# grep -r 'MOZ_ASSERT("' .
./toolkit/components/places/History.cpp: MOZ_ASSERT("Do not call me!");
./toolkit/components/places/Database.cpp: MOZ_ASSERT("Trying to set an unknown journal mode.");
./toolkit/components/places/nsAnnotationService.cpp: MOZ_ASSERT("Unsupported annotation type");
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → mozilla21
Comment 2•12 years ago
|
||
Comment on attachment 710452 [details] [diff] [review]
patch v1.0
>Bug 838349 - Fix bogus use of assertions in Places
[...]
>- MOZ_NOT_REACHED("Fetching favicon information failed unexpectedly.");
>+ MOZ_ASSERT(false, "Fetching favicon information failed unexpectedly.");
Was this change accidental? The MOZ_NOT_REACHED usage looks correct to me there.
Comment 3•12 years ago
|
||
(in fact, perhaps of the other fixed chunks would be better as MOZ_NOT_REACHED("")...? Or is MOZ_ASSERT(false,"") better than NOT_REACHED for some reason?)
Assignee | ||
Comment 4•12 years ago
|
||
MOZ_NOT_REACHED is different from NS_NOTREACHED, in the fact it tells the compiler to optimize that code path to be not reachable. My original intent there was just to put a NS_NOTREACHED but I was confused by the naming... MOZ_ASSERT is better too.
Assignee | ||
Comment 5•12 years ago
|
||
see bug 820686
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•