[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Thu Apr 8 02:20:49 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 48486986c9e27e950a47a843641db63e2fbb4fe8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 12 16:36:42 2010 +0000
2010-03-12 Kavita Kanetkar <kkanetkar at chromium.org>
Reviewed by Darin Fisher.
[chromium] Fix memory leak in WebImageDecoder API
https://bugs.webkit.org/show_bug.cgi?id=35946
* src/WebImageDecoder.cpp:
(WebKit::WebImageDecoder::setData):
(WebKit::WebImageDecoder::getFrameAtIndex):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0e45628..9397272 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-12 Kavita Kanetkar <kkanetkar at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Fix memory leak in WebImageDecoder API
+ https://bugs.webkit.org/show_bug.cgi?id=35946
+
+ * src/WebImageDecoder.cpp:
+ (WebKit::WebImageDecoder::setData):
+ (WebKit::WebImageDecoder::getFrameAtIndex):
+
2010-03-11 Aaron Boodman <aa at chromium.org>
Kill WebDocument::applicationID() (part 1).
diff --git a/WebKit/chromium/src/WebImageDecoder.cpp b/WebKit/chromium/src/WebImageDecoder.cpp
index 7264142..9e1d1f4 100644
--- a/WebKit/chromium/src/WebImageDecoder.cpp
+++ b/WebKit/chromium/src/WebImageDecoder.cpp
@@ -1,10 +1,10 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -38,6 +38,11 @@
#include "WebImage.h"
#include "WebSize.h"
+#if WEBKIT_USING_SKIA
+#include <wtf/OwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#endif
+
using namespace WebCore;
namespace WebKit {
@@ -62,8 +67,7 @@ void WebImageDecoder::init(Type type)
void WebImageDecoder::setData(const WebData& data, bool allDataReceived)
{
ASSERT(m_private);
- RefPtr<SharedBuffer> buffer(SharedBuffer::create(data.data(), data.size()));
- m_private->setData(buffer.get(), allDataReceived);
+ m_private->setData(PassRefPtr<SharedBuffer>(data).get(), allDataReceived);
}
bool WebImageDecoder::isFailed() const
@@ -106,8 +110,10 @@ WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const
if (!frameBuffer)
return WebImage();
#if WEBKIT_USING_SKIA
- return WebImage(*(frameBuffer->asNewNativeImage()));
+ OwnPtr<NativeImageSkia>image(frameBuffer->asNewNativeImage());
+ return WebImage(*image);
#elif WEBKIT_USING_CG
+ // FIXME: Implement CG side of this.
return WebImage(frameBuffer->asNewNativeImage());
#endif
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list