Skip to content

Commit

Permalink
Match task runner lifetime with the cache for SVGDocumentResources
Browse files Browse the repository at this point in the history
The task runner was taken from the passed ResourceFetcher, but since the
the SVGResourceDocumentContent loaded from the SVGDocumentResource can
outlive the ResourceFetcher, tasks posted to the task runner would not
be delivered if the latter was destroyed. Use the default task runner
from the AgentGroupScheduler instead since that should match the
lifetime of the SVGResourceDocumentCache (i.e the Page).

Fixed: 347724924
Change-Id: I6e04c5a665a992620451d8e0a324250f70cdef7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5639940
Reviewed-by: Philip Rogers <[email protected]>
Auto-Submit: Fredrik Söderquist <[email protected]>
Commit-Queue: Philip Rogers <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1317059}
  • Loading branch information
Fredrik Söderquist authored and chromium-wpt-export-bot committed Jun 19, 2024
1 parent 06c5b34 commit 43b4c04
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<svg width="100" height="100">
<use href="use-external-reload-in-iframe-resource.svg#blue"/>
</svg>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions svg/struct/scripted/use-external-reload-in-iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<title>&lt;use> with external resource in reloaded iframe</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe src="support/use-external-reload-in-iframe-child.html"></iframe>
<script>
async_test(t => {
window.onload = t.step_func(() => {
const iframe = document.querySelector('iframe');
iframe.onload = t.step_func_done();
iframe.contentWindow.location.reload();
});
});
</script>

0 comments on commit 43b4c04

Please sign in to comment.