Bug 10838 - REGRESSION: Leaking of WebScriptObjectPrivate
Summary: REGRESSION: Leaking of WebScriptObjectPrivate
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
Keywords: Regression
Depends on:
Reported: 2006-09-13 06:30 PDT by Mark Rowe (bdash)
Modified: 2006-10-02 10:50 PDT (History)
1 user (show)

See Also:

Patch (2.72 KB, patch)
2006-09-14 20:21 PDT, Mark Rowe (bdash)
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rowe (bdash) 2006-09-13 06:30:42 PDT
`run-webkit-tests --leaks` generates leak reports that have dozens of WebScriptObjectPrivate's being leaked.   An example of the backtrace is:

	Call stack: [thread 2d63a7]: | 0x0 | start | _start | main | runTest | -[NSRunLoop runMode:beforeDate:] | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSources0 | _sendCallbacks | -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] | -[NSURLConnection(NSURLConnectionInternal) _sendDidReceiveDataCallback] | -[WebLoader connection:didReceiveData:lengthReceived:] | -[WebMainResourceLoader didReceiveData:lengthReceived:allAtOnce:] | -[WebLoader didReceiveData:lengthReceived:allAtOnce:] | -[WebMainResourceLoader addData:allAtOnce:] | -[WebFrameLoader _receivedData:] | -[WebDataSource(WebInternal) _receivedData:] | -[WebDataSource(WebFileInternal) _commitLoadWithData:] | -[WebHTMLRepresentation receivedData:withDataSource:] | -[WebFrameBridge receivedData:textEncodingName:] | -[WebCoreFrameBridge setEncoding:userChosen:] | WebCore::Frame::setEncoding(WebCore::String const&, bool) | WebCore::Frame::receivedFirstData() | WebCore::Frame::begin(WebCore::KURL const&) | WebCore::FrameMac::partClearedInBegin() | -[WebFrameBridge windowObjectCleared] | -[WebCoreFrameBridge windowScriptObject] | WebCore::FrameMac::windowScriptObject() | -[WebScriptObject _initWithJSObject:originExecutionContext:executionContext:] | NSAllocateObject | _internal_class_createInstanceFromZone 
Leak: 0x1f89dce0  size=32	instance of 'WebScriptObjectPrivate'	
See http://build.webkit.org/results/post-commit-leaks-powerpc-mac-os-x/2531/DumpRenderTree5-leaks.txt for more examples.
Comment 1 Mark Rowe (bdash) 2006-09-14 18:03:49 PDT
The WebScriptObject's and co are expected to be cleaned up from FrameMac::cleanupPluginObjects, but this is never being called.  It is intended to be called from Frame::clear but as cleanupPluginObjects is a virtual method being called from the Frame destructor, the FrameMac subclass portion of the object has already been torn down.
Comment 2 Mark Rowe (bdash) 2006-09-14 20:21:22 PDT
Created attachment 10567 [details]
Comment 3 Adam Roben (:aroben) 2006-09-14 20:38:11 PDT
Comment on attachment 10567 [details]

r=me, although you've got a typo in your ChangeLog: "this its" should be "its"
Comment 4 Adam Roben (:aroben) 2006-09-14 20:42:42 PDT
Comment on attachment 10567 [details]

Stephanie is going to confirm that this patch helps fix some of our current performance regression, and then give you permission to check in if it does (since the tree is currently closed).
Comment 5 Mark Rowe (bdash) 2006-09-14 23:02:51 PDT
Stephanie gave the go-ahead via IRC, and this was landed as r16368.
Comment 6 Timothy Hatcher 2006-10-02 10:50:29 PDT
This landed in r16368.