Skip to content

Fixes servicerworker/client state syncing #1074

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 2, 2018
Merged

Conversation

bojeil-google
Copy link
Contributor

Defines the MessageChannel based utility for communicating window <=> window and window <=> worker.

Adds receiver in indexedDB when operating from a service worker to listen to keyChanged events.
On detection, indexedDB is synced and a response is returned to sender whether the key change was processed. It may be that the key change was already detected. This would return false.

Adds a sender when an indexedDB write operation occurs and a service worker is available. The client will send a keyChanged message to the service worker to process the change and blocks on it. On response, the indexedDB write operation will resolve. The operation will resolve on success or failure. This is a best effort approach. If the service worker fails to process, the write operation should still succeed.

Updates obsoleted APIs in web worker.

Defines the MessageChannel based utility for communicating window <=> window and window <=> worker.

Adds receiver in indexedDB when operating from a service worker to listen to keyChanged events.
On detection, indexedDB is synced and a response is returned to sender whether the key change was processed. It may be that the key change was already detected. This would return false.

Adds a sender when an indexedDB write operation occurs and a service worker is available. The client will send a keyChanged message to the service worker to process the change and blocks on it. On response, the indexedDB write operation will resolve. The operation will resolve on success or failure. This is a best effort approach. If the service worker fails to process, the write operation should still succeed.

Updates obsoleted APIs in web worker.
Copy link
Contributor

@wti806 wti806 left a comment

Choose a reason for hiding this comment

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

Do we need to add the copy right and license to those new files?

@bojeil-google
Copy link
Contributor Author

I added them.

@bojeil-google bojeil-google merged commit 2dab48d into master Aug 2, 2018
hiranya911 added a commit that referenced this pull request Aug 3, 2018
hiranya911 added a commit that referenced this pull request Aug 3, 2018
* Revert "Rxfire build fix (#1085)"

This reverts commit fd41378.

* Revert "Enable strict function types (#1082)"

This reverts commit 22ed571.

* Revert "Fixes servicerworker/client state syncing (#1074)"

This reverts commit 2dab48d.

* Revert "Prep rxfire release (#1079)"

This reverts commit c74c3b9.
@bojeil-google bojeil-google deleted the messagechannel branch August 26, 2018 07:06
@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