[Webkit-unassigned] [Bug 54905] Remove global initializer in CookieStorageCFNet.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 21 14:16:43 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54905





--- Comment #3 from Pratik Solanki <psolanki at apple.com>  2011-02-21 14:16:43 PST ---
(From update of attachment 83212)
View in context: https://bugs.webkit.org/attachment.cgi?id=83212&action=review

>> Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:43
>> +static CFHTTPCookieStorageRef s_cookieStorage;
> 
> Do we need to init s_cookieStorage to 0 ?

Statics are initialized to 0 so we should be fine here.

>> Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:70
>> +        s_cookieStorage = wkCreatePrivateHTTPCookieStorage();
> 
> Should we assert that s_cookieStorage is 0 here?

Good catch. adoptCF() calls CFRelease on its m_ptr so my patch would cause a leak. I think a conditional release before the if block should fix that.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list