- Revision
- 104324
- Author
- oli...@apple.com
- Date
- 2012-01-06 12:38:42 -0800 (Fri, 06 Jan 2012)
Log Message
DFG no longer optimises CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=75729
Reviewed by Gavin Barraclough.
Source/_javascript_Core:
Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
the future name when we switch over to the new typed-array based
ImageData specification.
* runtime/JSByteArray.cpp:
Source/WebCore:
Remove the custom ClassInfo for CanvasPixelArray as that is
defeating ByteArray optimisation, and is no longer needed
anyway as it was only there to change the visible name.
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (104323 => 104324)
--- trunk/Source/_javascript_Core/ChangeLog 2012-01-06 20:31:05 UTC (rev 104323)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-01-06 20:38:42 UTC (rev 104324)
@@ -1,3 +1,16 @@
+2012-01-06 Oliver Hunt <oli...@apple.com>
+
+ DFG no longer optimises CanvasPixelArray
+ https://bugs.webkit.org/show_bug.cgi?id=75729
+
+ Reviewed by Gavin Barraclough.
+
+ Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
+ the future name when we switch over to the new typed-array based
+ ImageData specification.
+
+ * runtime/JSByteArray.cpp:
+
2012-01-06 Caio Marcelo de Oliveira Filho <caio.olive...@openbossa.org>
Use HashMap<OwnPtr> for SourceProviderCache items
Modified: trunk/Source/_javascript_Core/runtime/JSByteArray.cpp (104323 => 104324)
--- trunk/Source/_javascript_Core/runtime/JSByteArray.cpp 2012-01-06 20:31:05 UTC (rev 104323)
+++ trunk/Source/_javascript_Core/runtime/JSByteArray.cpp 2012-01-06 20:38:42 UTC (rev 104324)
@@ -33,7 +33,7 @@
namespace JSC {
-const ClassInfo JSByteArray::s_info = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
+const ClassInfo JSByteArray::s_info = { "Uint8ClampedArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage)
: JSNonFinalObject(exec->globalData(), structure)
Modified: trunk/Source/WebCore/ChangeLog (104323 => 104324)
--- trunk/Source/WebCore/ChangeLog 2012-01-06 20:31:05 UTC (rev 104323)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 20:38:42 UTC (rev 104324)
@@ -1,3 +1,17 @@
+2012-01-06 Oliver Hunt <oli...@apple.com>
+
+ DFG no longer optimises CanvasPixelArray
+ https://bugs.webkit.org/show_bug.cgi?id=75729
+
+ Reviewed by Gavin Barraclough.
+
+ Remove the custom ClassInfo for CanvasPixelArray as that is
+ defeating ByteArray optimisation, and is no longer needed
+ anyway as it was only there to change the visible name.
+
+ * bindings/js/JSImageDataCustom.cpp:
+ (WebCore::toJS):
+
2012-01-06 Ken Buchanan <ke...@chromium.org>
ASSERT failure due to combine-text with preceding spaces
Modified: trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp (104323 => 104324)
--- trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp 2012-01-06 20:31:05 UTC (rev 104323)
+++ trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp 2012-01-06 20:38:42 UTC (rev 104324)
@@ -47,10 +47,9 @@
wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ImageData, imageData);
Identifier dataName(exec, "data");
- static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
- Structure* cpaStructure = getCachedDOMStructure(globalObject, &cpaClassInfo);
+ Structure* cpaStructure = getCachedDOMStructure(globalObject, &JSByteArray::s_info);
if (!cpaStructure)
- cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &cpaClassInfo), &cpaClassInfo);
+ cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &JSByteArray::s_info), &JSByteArray::s_info);
wrapper->putDirect(exec->globalData(), dataName, JSByteArray::create(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly);
exec->heap()->reportExtraMemoryCost(imageData->data()->length());