diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 6edc83a7f0808f66b6c0f2d95f959f5c9a70c51f..cfbfb8b676584b0b79333253b35e8a3171409e2d 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2009-10-02 Kenneth Russell + + Reviewed by Oliver Hunt. + + WebGL crashes with recent CanvasArray change + https://bugs.webkit.org/show_bug.cgi?id=30018 + + * fast/canvas/webgl/array-unit-tests-expected.html: Added. + * fast/canvas/webgl/array-unit-tests.html: Added. + 2009-10-02 Ben Murdoch Reviewed by David Kilzer. diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..bbb91928e352098a990140be6a7aa1ceb9afaa13 --- /dev/null +++ b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt @@ -0,0 +1,30 @@ +Verifies the functionality of the new array-like objects in the WebGL spec + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + +PASS test CanvasByteArray SetAndGetPos10ToNeg10 +PASS test CanvasByteArray ConstructWithArrayOfSignedValues +PASS test CanvasByteArray BoundaryConditions(-128, -128, 127, 127) +PASS test CanvasFloatArray SetAndGetPos10ToNeg10 +PASS test CanvasFloatArray ConstructWithArrayOfSignedValues +PASS test CanvasFloatArray BoundaryConditions(-500, -500, 500, 500) +PASS test CanvasIntArray SetAndGetPos10ToNeg10 +PASS test CanvasIntArray ConstructWithArrayOfSignedValues +PASS test CanvasIntArray BoundaryConditions(-2147483648, -2147483648, 2147483647, 2147483647) +PASS test CanvasShortArray SetAndGetPos10ToNeg10 +PASS test CanvasShortArray ConstructWithArrayOfSignedValues +PASS test CanvasShortArray BoundaryConditions(-32768, -32768, 32767, 32767) +PASS test CanvasUnsignedByteArray SetAndGet10To1 +PASS test CanvasUnsignedByteArray ConstructWithArrayOfUnsignedValues +PASS test CanvasUnsignedByteArray BoundaryConditions(0, 0, 255, 255) +PASS test CanvasUnsignedIntArray SetAndGet10To1 +PASS test CanvasUnsignedIntArray ConstructWithArrayOfUnsignedValues +PASS test CanvasUnsignedIntArray BoundaryConditions(0, 0, 4294967295, 4294967295) +PASS test CanvasUnsignedShortArray SetAndGet10To1 +PASS test CanvasUnsignedShortArray ConstructWithArrayOfUnsignedValues +PASS test CanvasUnsignedShortArray BoundaryConditions(0, 0, 65535, 65535) +Test passed. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests.html b/LayoutTests/fast/canvas/webgl/array-unit-tests.html new file mode 100644 index 0000000000000000000000000000000000000000..cbadd1f7cd1b2a4261cdf3fa31bcd06996a91c9f --- /dev/null +++ b/LayoutTests/fast/canvas/webgl/array-unit-tests.html @@ -0,0 +1,229 @@ + + + + + + +
+
+ + + + + + + + diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 37b17d590279c96c3d8f8bef6738e117532da87f..bc1e077aa1cb4c9430b5e8f9d1f98ec5f170c6b4 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2009-10-02 Kenneth Russell + + Reviewed by Oliver Hunt. + + WebGL crashes with recent CanvasArray change + https://bugs.webkit.org/show_bug.cgi?id=30018 + + Test: fast/canvas/webgl/array-unit-tests.html + + * html/canvas/CanvasArray.cpp: + (WebCore::CanvasArray::CanvasArray): + Fix bug where PassRefPtr was tested after transferring value to RefPtr. + 2009-10-02 Steve Falkenburg Reviewed by Mark Rowe. diff --git a/WebCore/html/canvas/CanvasArray.cpp b/WebCore/html/canvas/CanvasArray.cpp index 1e7c0b88e78eec1b9f8f18b3c2d6b512fb2e7fe7..6b5688ab2795af6a93c3b4ef994c154ae26e7fa0 100644 --- a/WebCore/html/canvas/CanvasArray.cpp +++ b/WebCore/html/canvas/CanvasArray.cpp @@ -36,7 +36,7 @@ namespace WebCore { : m_offset(offset) , m_buffer(buffer) { - m_baseAddress = buffer ? (static_cast(m_buffer->data()) + m_offset) : 0; + m_baseAddress = m_buffer ? (static_cast(m_buffer->data()) + m_offset) : 0; } CanvasArray::~CanvasArray()