forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1647883: Part 1 - Remove hashCode and equals overrides from Gecko…
…Session in favour of new, package-scoped GeckoSession.equalsId method; r=geckoview-reviewers,agi Because `GeckoSession`'s overrides of `hashCode` and `equals` look solely at session ID, this may cause strange behaviors if a `GeckoSession` is reloaded with session state from a previous instance, and the previous instance still exists. For example, suppose the previous instance is closed and the new instance is open. As far as the Android runtime is concerned, both objects are equivalent. Trying to insert both objects into the same container will not work as expected. In this patch, we revert those overrides. To ensure that we still have a short-circuit path in `GeckoView.restoreSession`, we add and utilize a new, `package`-scoped, `equalsId` method. Differential Revision: https://phabricator.services.mozilla.com/D81746
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters