| Summary: | Add a layout test to detect memory leaks when drawing images to a detached canvas | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||||
| Component: | Canvas | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | darin, dino, mmaxfield, simon.fraser, thorton, tsavell, webkit-bug-importer, wenson_hsieh | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=229668 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Said Abou-Hallawa
2021-09-01 19:11:07 PDT
Created attachment 437106 [details]
Patch
Created attachment 437112 [details]
Patch
Without r281839 the test in this patch fails with the following diff: - PASS internals.remoteImagesCount() is 0 + FAIL internals.remoteImagesCount() should be 0. Was 3. Comment on attachment 437112 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437112&action=review > Source/WebCore/ChangeLog:3 > + Add a layout test to detect memory leaks when darwing images to a detached canvas darwing > Source/WebKit/ChangeLog:3 > + Add a layout test to detect memory leaks when darwing images to a detached canvas darwing > Source/WebCore/page/Page.h:584 > + WEBCORE_EXPORT unsigned remoteImagesCount() const; Given this is for testing only, could we have internals go directly to the chrome client instead of putting a helper in Page? > > Source/WebCore/page/Page.h:584
> > + WEBCORE_EXPORT unsigned remoteImagesCount() const;
>
> Given this is for testing only, could we have internals go directly to the
> chrome client instead of putting a helper in Page?
Let's rename it to remoteImagesCountForTesting() also.
Created attachment 437209 [details]
Patch
Committed r281980 (241287@main): <https://commits.webkit.org/241287@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437209 [details]. It looks like the test added here is failing fast/canvas/canvas-drawImage-detached-leak.html History: https://results.webkit.org/?suite=layout-tests&test=fast%2Fcanvas%2Fcanvas-drawImage-detached-leak.html Diff: --- /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/fast/canvas/canvas-drawImage-detached-leak-expected.txt +++ /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/fast/canvas/canvas-drawImage-detached-leak-actual.txt @@ -3,7 +3,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -PASS internals.remoteImagesCountForTesting() is 0 +FAIL internals.remoteImagesCountForTesting() should be 0. Was 3. PASS successfullyParsed is true TEST COMPLETE That’s exactly what we’d expect if the fix in r281839 did not work. |