summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 18:55:20 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 18:55:20 +0000
commitd8f8a5949f1e5cd15058ade51296ca620d456736 (patch)
tree7326269d7822788cd3c3209cc460670f62547449 /webkit
parent01fab8b94bf539331104f3e2adffc4933766d362 (diff)
downloadchromium_src-d8f8a5949f1e5cd15058ade51296ca620d456736.zip
chromium_src-d8f8a5949f1e5cd15058ade51296ca620d456736.tar.gz
chromium_src-d8f8a5949f1e5cd15058ade51296ca620d456736.tar.bz2
Remove reference counting from WebWidgetDelegate.
This was added as a speculative crash fix by eseidel back in June of 2008. See http://b/1211911 for details. It didn't appear to resolve the crash then (as another patch was required to fix the bug), and it doesn't seem to be necessary since the RenderView, which is the delegate and owns the WebView, is the one in charge of allocating the WebView and destroying the WebView. So, it is not possible for the WebView to outlive the RenderView. BUG=16234 TEST=none R=brettw Review URL: http://codereview.chromium.org/155292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webview_impl.h4
-rw-r--r--webkit/glue/webwidget_delegate.h4
-rw-r--r--webkit/glue/webworker_impl.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h6
4 files changed, 2 insertions, 14 deletions
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index ac85c06..d55df1a 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -144,7 +144,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
static WebViewImpl* FromPage(WebCore::Page* page);
WebViewDelegate* delegate() {
- return delegate_.get();
+ return delegate_;
}
// Returns the page object associated with this view. This may be NULL when
@@ -228,7 +228,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
WebCore::Frame* frame,
const WebCore::PlatformKeyboardEvent& e);
- scoped_refptr<WebViewDelegate> delegate_;
+ WebViewDelegate* delegate_;
WebKit::WebSize size_;
WebKit::WebPoint last_mouse_position_;
diff --git a/webkit/glue/webwidget_delegate.h b/webkit/glue/webwidget_delegate.h
index 824b665..17704b0d 100644
--- a/webkit/glue/webwidget_delegate.h
+++ b/webkit/glue/webwidget_delegate.h
@@ -117,10 +117,6 @@ class WebWidgetDelegate {
// is closed. This is used to support |window.showModalDialog|.
virtual void RunModal(WebWidget* webwidget) = 0;
- // Owners depend on the delegates living as long as they do, so we ref them.
- virtual void AddRef() = 0;
- virtual void Release() = 0;
-
// Returns true if the widget is in a background tab.
virtual bool IsHidden(WebWidget* webwidget) = 0;
diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc
index d1ba068..e42dbfe 100644
--- a/webkit/glue/webworker_impl.cc
+++ b/webkit/glue/webworker_impl.cc
@@ -46,8 +46,6 @@ using WebKit::WebWorkerClient;
class WorkerWebViewDelegate : public WebViewDelegate {
public:
WorkerWebViewDelegate() {}
- virtual void AddRef() { }
- virtual void Release() { }
virtual void Blur(WebWidget *webwidget) { }
virtual void CloseWidgetSoon(WebWidget *webwidget) { }
virtual void DidInvalidateRect(WebWidget *webwidget,
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index f463c22..1ce235e 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -247,12 +247,6 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
virtual void RunModal(WebWidget* webwidget);
virtual bool IsHidden(WebWidget* webwidget);
virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget* webwidget);
- virtual void AddRef() {
- base::RefCounted<TestWebViewDelegate>::AddRef();
- }
- virtual void Release() {
- base::RefCounted<TestWebViewDelegate>::Release();
- }
void SetSmartInsertDeleteEnabled(bool enabled);
void SetSelectTrailingWhitespaceEnabled(bool enabled);