-
Notifications
You must be signed in to change notification settings - Fork 473
Adds exception handling for all places rust calls #12300
Adds exception handling for all places rust calls #12300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your concerns around things like addItem
(and addFolder
- although I can't find a caller of that :) - returning an empty GUID isn't ideal, and looking at the one caller I can find, Fenix is still going to try and open a "bookmarks editor", which is probably going to have a bad time. Sadly I don't know what the correct answer there is, but it feels like the right option would be to make these results nullable, which will mean consumers are forced to deal with it in a meaningful way - but that's a fair bit more work as it crosses repos, and really isn't our call to make.
tl;dr - I'm fine with this if the Fenix team is and agree it's better than a crash, but think they should probably take on another issue to make it cleaner - possibly how I describe above, or possibly in some other way. So r=me, but don't take my word for it 😅
And looking more at that, it already handles |
Hmmm I'd like more insight from some Fenix folks on what to do here, I have a couple of options:
For the sake of moving forward, I'll do option 2 in this PR, but happy to revert it back before landing |
7ca4c10
to
521eff8
Compare
This pull request has conflicts when rebasing. Could you fix it @tarikeshaq? 🙏 |
0872019
to
3199cee
Compare
This pull request has conflicts when rebasing. Could you fix it @tarikeshaq? 🙏 |
3199cee
to
30e312a
Compare
This pull request has conflicts when rebasing. Could you fix it @tarikeshaq? 🙏 |
@jonalmeida have you had the time to take a look at this? 😬 I'll rebase with your feedback if you have some! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this review took a while. Please ping me if I'm blocking you in the future. 🙂
...storage-sync/src/main/java/mozilla/components/browser/storage/sync/PlacesBookmarksStorage.kt
Show resolved
Hide resolved
...storage-sync/src/main/java/mozilla/components/browser/storage/sync/PlacesBookmarksStorage.kt
Show resolved
Hide resolved
30e312a
to
b976c7f
Compare
b976c7f
to
cd4471e
Compare
Should fix the crash in mozilla/application-services#4990
A little effy about the bookmarks changes because of the default values of the GUIDs, but that seems better than a crash? I haven't tracked the callers yet
Pull Request checklist
After merge