[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 11:30:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a06afbbc7d57f6bd4366411b63dd91a38965115c
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 27 21:06:35 2010 +0000
Fix PageClient ownership in WebPageProxy
WKView now owns the PageClient, similar to how things work on Windows
(where the WebView is the PageClient).
Fixes <http://webkit.org/b/40185> WebPageProxy should keep a weak
reference to the PageClient
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:]): Store the PageClientImpl
on our WKViewData object and pass it to the WebPageProxy.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPageClient):
* UIProcess/WebPageProxy.h:
Removed Mac-specific code that put the PageClient in an OwnPtr. We now
store it in a bare pointer just like on Windows.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 725472a..8762c83 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2010-07-27 Adam Roben <aroben at apple.com>
+
+ Fix PageClient ownership in WebPageProxy
+
+ WKView now owns the PageClient, similar to how things work on Windows
+ (where the WebView is the PageClient).
+
+ Fixes <http://webkit.org/b/40185> WebPageProxy should keep a weak
+ reference to the PageClient
+
+ Reviewed by Anders Carlsson.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:pageNamespaceRef:]): Store the PageClientImpl
+ on our WKViewData object and pass it to the WebPageProxy.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setPageClient):
+ * UIProcess/WebPageProxy.h:
+ Removed Mac-specific code that put the PageClient in an OwnPtr. We now
+ store it in a bare pointer just like on Windows.
+
2010-07-27 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 642d67e..664f32d 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -49,6 +49,7 @@ using namespace WebCore;
@interface WKViewData : NSObject {
@public
+ OwnPtr<PageClientImpl> _pageClient;
RefPtr<WebPageProxy> _page;
// For ToolTips.
@@ -84,8 +85,9 @@ using namespace WebCore;
_data = [[WKViewData alloc] init];
+ _data->_pageClient.set(new PageClientImpl(self));
_data->_page = toWK(pageNamespaceRef)->createWebPage();
- _data->_page->setPageClient(new PageClientImpl(self));
+ _data->_page->setPageClient(_data->_pageClient.get());
_data->_page->initializeWebPage(IntSize(frame.size), new ChunkedUpdateDrawingAreaProxy(self));
_data->_page->setIsInWindow([self window]);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 5cd81a8..6192d86 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -97,11 +97,7 @@ bool WebPageProxy::isValid()
void WebPageProxy::setPageClient(PageClient* pageClient)
{
-#if PLATFORM(WIN)
m_pageClient = pageClient;
-#else
- m_pageClient.set(pageClient);
-#endif
}
void WebPageProxy::setDrawingArea(PassOwnPtr<DrawingAreaProxy> drawingArea)
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 55f4d7c..69d5227 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -210,13 +210,7 @@ private:
void didChangeAcceleratedCompositing(bool compositing);
#endif
-#if PLATFORM(WIN)
PageClient* m_pageClient;
-#else
- // FIXME: This should not be an OwnPtr to the PageClient. We need to find a better way to clean up m_pageClient on mac.
- // http://bugs.webkit.org/show_bug.cgi?id=40185
- OwnPtr<PageClient> m_pageClient;
-#endif
WebLoaderClient m_loaderClient;
WebPolicyClient m_policyClient;
WebUIClient m_uiClient;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list