Commit 61550845 authored by beidson@apple.com's avatar beidson@apple.com

REGRESSION (31281): -[WebArchive initWithCoder:] leaks

<rdar://problem/7702420> and https://bugs.webkit.org/show_bug.cgi?id=35534

Reviewed by Geoff Garen.

* WebView/WebArchive.mm:
(-[WebArchive initWithCoder:]): Don't retain objects we don't own.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4c418e95
2010-03-04 Brady Eidson <beidson@apple.com>
Reviewed by Geoff Garen.
REGRESSION (31281): -[WebArchive initWithCoder:] leaks
<rdar://problem/7702420> and https://bugs.webkit.org/show_bug.cgi?id=35534
* WebView/WebArchive.mm:
(-[WebArchive initWithCoder:]): Don't retain objects we don't own.
2010-03-03 Alexey Proskuryakov <ap@apple.com>
Reviewed by Timothy Hatcher.
......
......@@ -239,13 +239,13 @@ static BOOL isArrayOfClass(id object, Class elementClass)
@try {
id object = [decoder decodeObjectForKey:WebMainResourceKey];
if ([object isKindOfClass:[WebResource class]])
mainResource = [object retain];
mainResource = object;
object = [decoder decodeObjectForKey:WebSubresourcesKey];
if (isArrayOfClass(object, [WebResource class]))
subresources = [object retain];
subresources = object;
object = [decoder decodeObjectForKey:WebSubframeArchivesKey];
if (isArrayOfClass(object, [WebArchive class]))
subframeArchives = [object retain];
subframeArchives = object;
} @catch(id) {
[self release];
return nil;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment