Bug 30615

Summary: Web Inspector: Fix DOM Agent leak
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: mrowe, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
timothy: review+
real fix
none
real fix on ToT timothy: review+

Description Pavel Feldman 2009-10-20 19:21:47 PDT
Call stack: [thread 0x7fff70c63be0]: | start | main | dumpRenderTree(int, char const**) | runTestingServerLoop() | runTest(std::string const&) | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] | CFRunLoopRunSpecific | __CFRunLoopRun | WebCore::timerFired(__CFRunLoopTimer*, void*) | WebCore::ThreadTimers::sharedTimerFired() | WebCore::ThreadTimers::sharedTimerFiredInternal() | WebCore::Timer<WebCore::Document>::fired() | WebCore::Document::executeScriptSoonTimerFired(WebCore::Timer<WebCore::Document>*) | WebCore::ScriptElementData::execute(WebCore::CachedScript*) | WebCore::HTMLScriptElement::dispatchLoadEvent() | WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) | WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr<WebCore::Event>) | WebCore::Node::handleLocalEvents(WebCore::Event*) | WebCore::EventTarget::fireEventListeners(WebCore::Event*) | WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) | JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) | JSC::JSFunction::call(JSC::ExecState*, JSC::JSValue, JSC::ArgList const&) | JSC::Interpreter::execute(JSC::FunctionExecutable*, JSC::ExecState*, JSC::JSFunction*, JSC::JSObject*, JSC::ArgList const&, JSC::ScopeChainNode*, JSC::JSValue*) | JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*, JSC::JSValue*) | 0x47fda06001c4 | WebCore::jsInspectorBackendPrototypeFunctionLoaded(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, JSC::ArgList const&) | WebCore::InspectorBackend::loaded() | WebCore::InspectorController::scriptObjectReady() | WebCore::InspectorController::setFrontendProxyObject(JSC::ExecState*, WebCore::ScriptObject, WebCore::ScriptObject) | WebCore::InspectorDOMAgent::InspectorDOMAgent(WebCore::InspectorFrontend*) | WTF::ListHashSet<WTF::RefPtr<WebCore::Document>, WTF::PtrHash<WTF::RefPtr<WebCore::Document> > >::ListHashSet() | WTF::fastMalloc(unsigned long) | malloc | malloc_zone_malloc 

Looks like a InspectorDOMAgent -> Document -> Event Listener -> InspectorDOMAgent ref counted circle.
Comment 1 Pavel Feldman 2009-10-20 22:20:25 PDT
Created attachment 41546 [details]
patch
Comment 2 Pavel Feldman 2009-10-21 06:34:10 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
Committed r49903
Comment 3 Pavel Feldman 2009-10-21 07:28:18 PDT
It is still there...
Comment 4 Pavel Feldman 2009-10-22 10:57:35 PDT
Created attachment 41666 [details]
real fix
Comment 5 Pavel Feldman 2009-10-22 11:07:01 PDT
Created attachment 41667 [details]
real fix on ToT
Comment 6 Pavel Feldman 2009-10-22 12:16:14 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	M	WebCore/inspector/InspectorDOMAgent.h