Skip to content

Attempt to delete client metadata row #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2018
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

We should try to delete the client metadata row from LocalStorage even if .shutdown() wasn't called. Because it won't be.

Copy link
Contributor

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

this.removeItem(this.localClientStorageKey);
this.started = false;
if (this.started) {
this.platform.window.removeEventListener('storage', this.storageListener);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the 'unload' hook too? (FWIW that might mean we don't need the this.started check, though I don't know if that's guaranteed or not... so probably fine to leave it.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted not to. It provides very little gain and adds more state keeping (I would have to keep a reference to the original function pointer for it to work consistently in all browsers).

@schmidt-sebastian schmidt-sebastian merged commit 7ef7d51 into master Aug 16, 2018
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-unload branch August 16, 2018 22:59
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants