Closed
Bug 1024322
Opened 10 years ago
Closed 10 years ago
Replace new calls to MOZ_ASSUME_UNREACHABLE added in dom
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
3.37 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
This patch is part of bug 990764, replacing calls to deprecated MOZ_ASSUME_UNREACHABLE with MOZ_CRASH or MOZ_ASSERT_UNREACHABLE (which is an assertion in all debug builds and release builds on the Nightly channel). These calls to MOZ_ASSUME_UNREACHABLE in dom/ have crept in since I removed them all in a patch you reviewed in bug 990764 comment 24. :)
Attachment #8438962 -
Flags: review?(bugs)
Comment 1•10 years ago
|
||
Comment on attachment 8438962 [details] [diff] [review] remove-dom-MOZ_ASSUME_UNREACHABLE.patch >+++ b/dom/datastore/DataStoreDB.cpp >@@ -112,18 +112,17 @@ DataStoreDB::HandleEvent(nsIDOMEvent* aE > if (type.EqualsASCII("error") || type.EqualsASCII("blocked")) { > RemoveEventListeners(); > mState = Inactive; > mCallback->Run(this, false); > mRequest = nullptr; > return NS_OK; > } > >- MOZ_ASSUME_UNREACHABLE("This should not happen"); >- return NS_OK; >+ MOZ_CRASH("This should not happen"); You need some return value here. so keep return NS_OK;
Attachment #8438962 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #1) > >- MOZ_ASSUME_UNREACHABLE("This should not happen"); > >- return NS_OK; > >+ MOZ_CRASH("This should not happen"); > You need some return value here. > so keep return NS_OK; Why do we need a return value? The compiler (or at least the ones we use on the try servers) knows that the function won't return through that code path and doesn't emit a compilation error.
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/99682bd658ed
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/99682bd658ed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•