Use OwnArrayPtr<> for new[]-allocated memory to match the delete[] call
BUG=149736
Review URL: https://chromiumcodereview.appspot.com/10928210
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156981 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/CCRendererGL.cpp b/cc/CCRendererGL.cpp
index bb1ba3b..36a3137 100644
--- a/cc/CCRendererGL.cpp
+++ b/cc/CCRendererGL.cpp
@@ -41,6 +41,7 @@
#include <string>
#include <vector>
#include <wtf/CurrentTime.h>
+#include <wtf/OwnArrayPtr.h>
using namespace std;
using WebKit::WebGraphicsContext3D;
@@ -1146,7 +1147,7 @@
ASSERT(m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE);
}
- OwnPtr<uint8_t> srcPixels = adoptPtr(new uint8_t[rect.width() * rect.height() * 4]);
+ OwnArrayPtr<uint8_t> srcPixels = adoptArrayPtr(new uint8_t[rect.width() * rect.height() * 4]);
GLC(m_context, m_context->readPixels(rect.x(), viewportSize().height() - rect.maxY(), rect.width(), rect.height(),
GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, srcPixels.get()));