<rdar://problem/5974306> CanvasRenderingContext2D becomes invalid when source canvas...
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 07:35:27 +0000 (07:35 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 07:35:27 +0000 (07:35 +0000)
commit192732c660eb5d1c4caafb83ae12e864df5fc6b9
tree9dad916e08bfe7ca775d9f017d0b56062b134547
parenta7e4996f8495c7f6e3f4003dafa13c17926fab1f
<rdar://problem/5974306> CanvasRenderingContext2D becomes invalid when source canvas element is collected

Reviewed by Geoff Garen.

In order to fix this we now make the rendering context and the canvas element
share the same reference count, ensuring that references to the rendering
context will force the canvas element to remain live as well.

Test: fast/canvas/canvas-longlived-context.html

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-longlived-context-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-longlived-context.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-longlived-context.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/CanvasRenderingContext2D.cpp
WebCore/html/CanvasRenderingContext2D.h
WebCore/html/HTMLCanvasElement.cpp
WebCore/html/HTMLCanvasElement.h