| Commit-Queue | +1 |
// TODO(crbug.com/435625756): Surface the integrity failure to theI left this as a TODO here for now (and also in `image_resource.cc`) since it's not really clear to me how we can plumb through the failure from here to a `execution_context` in a non-ugly way. If you have any pointers on how we can achieve that, it would be much appreciated 😄
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (has_integrity) {
if (PassedIntegrityChecks()) {
UpdateImage(Data(), ImageResourceContent::kUpdateImage, true);
} else {
// TODO(crbug.com/435625756): Surface the integrity failure to the
// devtools console.
UpdateImage(nullptr, ImageResourceContent::kClearImageAndNotifyObservers,
/*all_data_received=*/true);
}
ClearData();
}This changes the ordering in a way that may have additional side-effects. Perhaps it would be better to explicitly call `CheckResourceIntegrity` here instead (it should then be a no-op in `Resource::Finish`. I'm also not sure how integrity would interact with multipart, but if anyone has a use case for it I guess it can be solved... (But maybe ignore it in that case for now? Maybe Mike can shed some light there.)
if (has_integrity && !has_successful_revalidation) {
if (PassedIntegrityChecks()) {
notify_observers = UpdateContent();
} else {
// TODO(crbug.com/435625756): Surface the integrity failure to the
// devtools console.
content_->UpdateStatus(ResourceStatus::kLoadError);
notify_observers = true;
}
}Same concern here.
<link rel="match" href="../url-image-ref.html">This test looks like it could use one of the pre-existing 100x100 (or other dimension) green rects.
<link rel="match" href="../url-image-ref.html">Ditto here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Oh, and we probably want to flag guard at least some of this? (The case where integrity was previously checked.)