We found `state` can be a `nullptr` here https://searchfox.org/mozilla-central/rev/dac45cc7020dfddbcc937827810dd11550c07dc3/dom/cache/DBSchema.cpp#2272 because it's possible that there is no result for the statement. We should investigate the reason for that. If that's reasonable, we should consider changing the returning type for `ReadRequest` to `Result<Maybe<SavedRequest>, nsresult>`. If it's because of database corruption, we should consider returning `NS_ERROR_FILE_CORRECPTED` while `state` is a `nullptr`. Note in bug 1684838, we return `NS_ERROR_UNEXPECTED` if `state` is a `nullptr`.
Bug 1687305 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
We found `state` can be a `nullptr` here https://searchfox.org/mozilla-central/rev/dac45cc7020dfddbcc937827810dd11550c07dc3/dom/cache/DBSchema.cpp#2272 because it's possible that there is no result for the statement. We should investigate the reason for that. If that's reasonable, we should consider changing the returning type for `ReadRequest` to `Result<Maybe<SavedRequest>, nsresult>`. If it's because of database corruption, we should consider returning `NS_ERROR_FILE_CORRECPTED` while `state` is a `nullptr` if it's because of database corruptions. We should have a test to ensure the behavior. Note in bug 1684838, we return `NS_ERROR_UNEXPECTED` if `state` is a `nullptr`.