[webkit-reviews] review denied: [Bug 63155] Add NSError wrapper functions in ResourceError when USE(CFNETWORK) is enabled : [Attachment 98202] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 22 11:28:16 PDT 2011


Darin Adler <darin at apple.com> has denied Pratik Solanki <psolanki at apple.com>'s
request for review:
Bug 63155: Add NSError wrapper functions in ResourceError when USE(CFNETWORK)
is enabled
https://bugs.webkit.org/show_bug.cgi?id=63155

Attachment 98202: Patch
https://bugs.webkit.org/attachment.cgi?id=98202&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=98202&action=review

> Source/WebCore/platform/network/mac/ResourceErrorMac.mm:56
> +    RetainPtr<NSDictionary> userInfo(AdoptNS, (NSDictionary *)
CFErrorCopyUserInfo(error));

This needs to be AdoptCF, not AdoptNS.

The difference between the two is in garbage collection mode. What matters is
the type of retain, CFRetain vs [retain].

> Source/WebCore/platform/network/mac/ResourceErrorMac.mm:57
> +    return [NSError errorWithDomain:(NSString*)CFErrorGetDomain(error)
code:CFErrorGetCode(error) userInfo:userInfo.get()];

Don’t we want to cache a single NSError rather than creating new autoreleased
one every time? I’m worried about the performance implications of creating new
ones every time.

> Source/WebKit/mac/ChangeLog:8
> +	   Use the explicit ResourceError::nsError() method instead of implicit
operator casts.

Why?


More information about the webkit-reviews mailing list