Re-consider `close` method on the RustPlacesConnection
Categories
(Fenix :: History, task)
Tracking
(Not tracked)
People
(Reporter: cpeterson, Unassigned)
Details
From github: https://github.com/mozilla-mobile/android-components/issues/7348.
In its current form, it's broken:
- if we ever
close
(and null-out theapi
reference), there's currently no way to re-open the connectionThis caused a problem on the sample browser, which called the
close
method in its activity's onDestroy, and we'd end up crashing on next access to the storage layer.We haven't seen this happen in Fenix or r-b because they don't ever end up calling the cleanup/close methods.
It's not clear to me that we ever do need to clean up these connections; if the process isn't around at all, we're good - OS will clean up after us. If we have some background worker running and accessing storage (e.g. sync), we certainly shouldn't try to close the connection as part of the activity lifecycle.
The semantics of "once initialized, keep the connection(s) around for the duration of the process's lifecycle" seems just fine here. If that's the case, we should remove the
close
andcleanup
methods from the API surface.cc @thomcc
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Reporter | ||
Updated•2 years ago
|
Updated•1 year ago
|
Description
•