[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
bfulgham at webkit.org
bfulgham at webkit.org
Wed Dec 22 13:08:42 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 128511d80ab35c1a6401c4af83993bc8ace753c9
Author: bfulgham at webkit.org <bfulgham at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 7 19:56:34 2010 +0000
2010-09-07 Brent Fulgham <bfulgham at webkit.org>
Reviewed by Adam Roben.
Clean up a potential resource leak.
https://bugs.webkit.org/show_bug.cgi?id=45198
Several bitmap device context were being created and used,
and destroyed without returning the context to its original
state. This showed up as bitmap leaks in BoundsChecker.
* FullscreenVideoController.cpp:
* WebView.cpp:
(WebView::scrollBackingStore):
(WebView::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index deca074..44e2f78 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-07 Brent Fulgham <bfulgham at webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Clean up a potential resource leak.
+ https://bugs.webkit.org/show_bug.cgi?id=45198
+
+ Several bitmap device context were being created and used,
+ and destroyed without returning the context to its original
+ state. This showed up as bitmap leaks in BoundsChecker.
+
+ * FullscreenVideoController.cpp:
+ * WebView.cpp:
+ (WebView::scrollBackingStore):
+ (WebView::paint):
+
2010-09-06 Adam Barth <abarth at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp
index 3aeb1ba..4b50889 100644
--- a/WebKit/win/FullscreenVideoController.cpp
+++ b/WebKit/win/FullscreenVideoController.cpp
@@ -476,7 +476,7 @@ void FullscreenVideoController::draw()
HDC windowDC = GetDC(m_hudWindow);
HDC bitmapDC = CreateCompatibleDC(windowDC);
::ReleaseDC(m_hudWindow, windowDC);
- SelectObject(bitmapDC, m_bitmap.get());
+ HGDIOBJ oldBitmap = SelectObject(bitmapDC, m_bitmap.get());
GraphicsContext context(bitmapDC, true);
@@ -543,6 +543,7 @@ void FullscreenVideoController::draw()
context.restore();
+ ::SelectObject(bitmapDC, oldBitmap);
::DeleteDC(bitmapDC);
}
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 5aa4fc4..fdcd1db 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -826,7 +826,7 @@ void WebView::scrollBackingStore(FrameView* frameView, int dx, int dy, const Int
// Collect our device context info and select the bitmap to scroll.
HDC windowDC = ::GetDC(m_viewWindow);
HDC bitmapDC = ::CreateCompatibleDC(windowDC);
- ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
+ HGDIOBJ oldBitmap = ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
// Scroll the bitmap.
RECT scrollRectWin(scrollViewRect);
@@ -848,6 +848,7 @@ void WebView::scrollBackingStore(FrameView* frameView, int dx, int dy, const Int
updateBackingStore(frameView, bitmapDC, false);
// Clean up.
+ ::SelectObject(bitmapDC, oldBitmap);
::DeleteDC(bitmapDC);
::ReleaseDC(m_viewWindow, windowDC);
}
@@ -987,7 +988,7 @@ void WebView::paint(HDC dc, LPARAM options)
m_paintCount++;
HDC bitmapDC = ::CreateCompatibleDC(hdc);
- ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
+ HGDIOBJ oldBitmap = ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
// Update our backing store if needed.
updateBackingStore(frameView, bitmapDC, backingStoreCompletelyDirty, windowsToPaint);
@@ -1012,6 +1013,7 @@ void WebView::paint(HDC dc, LPARAM options)
updateRootLayerContents();
#endif
+ ::SelectObject(bitmapDC, oldBitmap);
::DeleteDC(bitmapDC);
if (!dc)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list