Remove caching of CORS info from CanvasRenderingContext.
Before this CL, CanvasRenderingContext remembered which request URLs were CORS same-origin and which were CORS cross-origin. This worked relatively well in a pre-service-worker world. But with service workers, the same request URL can have different response URLs. Also, even if two things have have the same response URL, they could differ in whether they were CORS approved or not. The solution is to remove the caching entirely. This causes more calls to CanvasImageSource::WouldTaintOrigin(), but the implementations of those look relatively lightweight so I don't expect performance to be worse than tracking URLs in two HashSets. Test: fetch-canvas-tainting-double-write.https.html added in https://chromium-review.googlesource.com/c/chromium/src/+/1347952. Bug: 907047 Change-Id: I4cf6289174935dee40ccad0364eb425d717b9f7f Reviewed-on: https://chromium-review.googlesource.com/c/1347953Reviewed-by:Fernando Serboncini <fserb@chromium.org> Reviewed-by:
Makoto Shimazu <shimazu@chromium.org> Commit-Queue: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#610498}
Showing
Please register or sign in to comment