[webkit-reviews] review denied: [Bug 208012] [Cocoa] Limit set of classes that can be decoded when a preference has changed : [Attachment 391299] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 26 13:15:27 PST 2020
Brent Fulgham <bfulgham at webkit.org> has denied Per Arne Vollan
<pvollan at apple.com>'s request for review:
Bug 208012: [Cocoa] Limit set of classes that can be decoded when a preference
has changed
https://bugs.webkit.org/show_bug.cgi?id=208012
Attachment 391299: Patch
https://bugs.webkit.org/attachment.cgi?id=391299&action=review
--- Comment #3 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 391299
--> https://bugs.webkit.org/attachment.cgi?id=391299
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=391299&action=review
I think this looks good, but marking r- because I think this introduces a leak.
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:945
> + auto classes = [NSSet setWithArray:@[[NSString class], [NSNumber class],
[NSDate class], [NSDictionary class], [NSArray class], [NSData class]]];
We should consider making this a static thing that doesn't have to get
reconstructed every time there is a preference change.
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:946
> + id object = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes
fromData:encodedData.get() error:&err];
Don't we still need to retain the unarchived object returned by this method?
Either we were over-releasing previously, or you've introduced a leak here.
More information about the webkit-reviews
mailing list