Use a separate caching layer for SVG external Documents
External SVG documents are loaded using the DocumentResource subclass of Resource, which stores the external Document. As of https://chromium.googlesource.com/chromium/src/+/099517c767c6ef8d66408c03004d9e3a12be5011, that Document is created with a context Document. The MemoryCache architecture allows the reuse of Resources across different Documents, and it seems wrong for an external SVG Document to get used in a different Document than the one that is considered its context Document. This introduces a new registry for loading SVG external documents, and makes DocumentResource an implementation detail of that registry. It ensures that these resources are not kept in the MemoryCache, and because the registry is per-Document, it ensures that the external documents will not be shared across contexts. Bug: 1029822 Change-Id: Ibcff651a2c22ec924ff92d01b0bb63ff17f399ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128234 Commit-Queue: Nate Chapin <japhet@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Reviewed-by:
Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#760591}
Showing
Please register or sign in to comment