Bug 20377
| Summary: | REGRESSION: Leaks on TOT | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sam |
| Priority: | P1 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.5 | ||
Eric Seidel (no email)
Leak: 0x173ddf30 size=32
0x1b429650 0x00000040 0x0000003f 0x00000001 P.B.@...?.......
0x00000000 0x00000000 0x08000100 0x00020000 ................
Call stack: [thread 17fffff]: | 0x2 | start | _start | main | dumpRenderTree(int, char const**) | runTestingServerLoop() | runTest(char const*) | -[NSRunLoop runMode:beforeDate:] | CFRunLoopRunInMode | CFRunLoopRunSpecific | _sendCallbacks | -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] | -[NSURLConnection(NSURLConnectionInternal) _sendDidReceiveResponseCallback] | -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:] | WebCore::ResourceLoader::didReceiveResponse(WebCore::ResourceHandle*, WebCore::ResourceResponse const&) | WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) | WebCore::XMLHttpRequest::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&) | WebCore::XMLHttpRequest::didReceiveResponsePreflight(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&) | WTF::fastMalloc(unsigned long) | malloc
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
This would fix it, but an ownptr would be cleaner:
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 072f7fa..af70409 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -625,8 +625,10 @@ void XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight(ExceptionCode& ec)
PreflightResultCache::iterator cacheIt = preflightResultCache().find(std::make_pair(origin, url));
if (cacheIt != preflightResultCache().end()) {
skipPreflight = canSkipPrelight(cacheIt, m_includeCredentials, m_method, m_requestHeaders);
- if (!skipPreflight)
+ if (!skipPreflight) {
+ delete *cacheIt;
preflightResultCache().remove(cacheIt);
+ }
}
if (!skipPreflight) {
Eric Seidel (no email)
http://build.webkit.org/results/trunk-mac-intel-debug/4820/
Sam Weinig
Fixed in r35927.