diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-05 16:59:38 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-05 16:59:38 +0000 |
commit | 07c42a337311313c7737df45898e93962bbdc6c3 (patch) | |
tree | 513284ea868260c09c6570b301eb1f133ba2bf2c /webkit/port/page | |
parent | cbff83ed05ed3c3a16ff90dab7a3485893d68615 (diff) | |
download | chromium_src-07c42a337311313c7737df45898e93962bbdc6c3.zip chromium_src-07c42a337311313c7737df45898e93962bbdc6c3.tar.gz chromium_src-07c42a337311313c7737df45898e93962bbdc6c3.tar.bz2 |
Fix a leak where InspectorController was not getting destroyed. This
was preventing the WebView and WebFrame from being destroyed since
InspectorController holds a WebInspectorClient which holds a WebView
which holds a WebFrame. This should clear up most of the memory leaks.
In the long run, we need to figure out why our version of
InspectorController needs to be RefCounted so it's not forked in this
way.
Review URL: http://codereview.chromium.org/6259
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/page')
-rw-r--r-- | webkit/port/page/inspector/InspectorController.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webkit/port/page/inspector/InspectorController.cpp b/webkit/port/page/inspector/InspectorController.cpp index a5be0b4..95abc25 100644 --- a/webkit/port/page/inspector/InspectorController.cpp +++ b/webkit/port/page/inspector/InspectorController.cpp @@ -1121,7 +1121,15 @@ static JSValueRef debuggerAttached(JSContextRef ctx, JSObjectRef /*function*/, J #pragma mark InspectorController Class InspectorController::InspectorController(Page* page, InspectorClient* client) - : m_bug1228513_inspectorState(bug1228513::VALID) + : +#if USE(V8) + // The V8 version of InspectorController is RefCounted while the JSC + // version uses an OwnPtr (http://b/904340). However, since we're not + // using a create method to initialize the InspectorController, we need + // to start the RefCount at 0. + RefCounted(0), +#endif + m_bug1228513_inspectorState(bug1228513::VALID) , m_inspectedPage(page) , m_client(client) , m_page(0) |