-
Notifications
You must be signed in to change notification settings - Fork 816
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
Add a check to wait for the resulting client ID #2210
Conversation
1bf0e19
to
515b669
Compare
For some reason the I think let's merge a few of the other open |
515b669
to
8f5d621
Compare
const reg = await wb.register(); | ||
const updatefoundPromise = new Promise((resolve) => { |
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.
This test from yesterday needed a bit more cleaning up, as there was a race condition in which the updatefound
listener might not have been registered in time to catch the update. Registering the listener early and then waiting later on for the promise resolution should fix that.
8a2c728
to
ba96115
Compare
ba96115
to
a78252c
Compare
Updated to skip the failing test in Safari. @jeffposnick can you PTAL. |
PR-Bot Size PluginChanged File Sizes
New FilesNo new files have been added. All File SizesView Table
Workbox Aggregate Size Plugin3.51KB gzip'ed (23% of limit) |
R: @jeffposnick
Fixes #2203, fixes #2204
To fix #2203, this PR adds a
resultingClientExists()
method that accepts aresultingClientId
value and awaits the existence of the client. It can also resolve toundefined
in one of two conditions:resultingClientId
value isundefined
(as will happen in a browser that doesn't support it).Then, to fix #2204, in the
BroadcastCacheUpdate
class, I've added atimeout
that waits for an additional 3.5 seconds (explanation here) in Safari or if theresultingClientExists()
function doesn't find a matching client. (Note: I've added a TODO to remove the Safari check once this bug has been released.)I've also updated the integrations to be more comprehensive. Previously there was only a test for resource requests, so I've added: