Created attachment 399958 [details] An HTML code to reproduce Safari crashes because of memory leak. This issue occurs both on iOS and macOS. I attached the reproduction code, also put it on the Gist. https://gist.github.com/kulikala/039d7c94f46ee860f1f9e2714104cb90 Trigger condition is same with the following issue: https://bugs.webkit.org/show_bug.cgi?id=134355 > ctx.drawImage(anotherCanvas, clipX, clipY, clipW, clipH, x, y, w, h) --> memory leak. > ctx.drawImage(anotherCanvas, x, y, w, h) --> no memory leak. There's a slight difference with my reproduction code: the image source is switched to HTMLVideoElement. I confirmed this memory leak via Web Inspector's Timelines tab. Page category of memory instrument keeps growing and reaches 3GB (my MacBook Pro has 16GB memory).
Safari kills the page for using too much memory in a few seconds.
<rdar://problem/63500557>
What macOS/iOS versions are you reproducing this on?
I confirmed the reproduction on macOS: Catalina v10.15.4 Safari: v13.1 (15609.1.20.111.8) iOS: v13.5