[web] [fix] Cache resource data only if the fetching succeed#103816
[web] [fix] Cache resource data only if the fetching succeed#103816fluttergithubbot merged 1 commit intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
fbfe63e to
4f73b43
Compare
|
@ditman When you have time, I would appreciate your review. |
dev/bots/service_worker_test.dart
Outdated
There was a problem hiding this comment.
Fix indent:
void _expectRequestCounts(
Map<String, int> expectedCounts,
Map<String, int> requestedPathCounts,
) {
dev/bots/service_worker_test.dart
Outdated
There was a problem hiding this comment.
Fix indent:
Future<void> _waitForAppToLoad(
Map<String, int> waitForCounts,
Map<String, int> requestedPathCounts,
AppServer? server
) async {
dev/bots/service_worker_test.dart
Outdated
d7eee39 to
864e6da
Compare
[fix] [web] Updated tests [fix] [web] Added tests
864e6da to
9ff6018
Compare

Fix for issue #99671
Caching the resulting resource is done regardless of whether the call was successful. This results in caching both successful and failed results.
This PR changes the logic to only cache successful results.
Closes #99671
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.