Skip to content

Add onBlocked handler for schema upgrade #963

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 3 commits into from
Jun 26, 2018

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jun 26, 2018

We need to add an onblocked handler to our schema upgrade code. This handler gets called when another tab already has an open database connection. These connections prevent schema upgrades, but without this PR, we currently don't fail "enablePersistence()" and instead never resolve the Promise.

Let me know if you think we should include the origin/host name in the error message.

FYI: There is no code that tests this codepath as our schema upgrade tests set up their own onsuccess/onfailure handlers.

@schmidt-sebastian schmidt-sebastian changed the title Mrschmidt onblocked Add onBlocked handler for schema upgrade Jun 26, 2018
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. Thanks for looking into this!

@schmidt-sebastian schmidt-sebastian merged commit 189bcea into master Jun 26, 2018
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-onblocked branch June 27, 2018 17:52
@firebase firebase locked and limited conversation to collaborators Oct 18, 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