RESOLVED FIXED 57477
ASSERT(cookieStorageAdapter) when calling stopObservingCookieChanges after WebProcess has crashed
https://bugs.webkit.org/show_bug.cgi?id=57477
Summary ASSERT(cookieStorageAdapter) when calling stopObservingCookieChanges after We...
Brian Weinstein
Reported Wednesday, March 30, 2011 6:56:04 PM UTC
If we have called CookieStorageMac::startObservingCookieChanges, and then the WebProcess crashes, the WebProcess will restart, and when we call stopObservingCookieChanges, cookieStorageAdapter won't have been initialized yet, and the ASSERT(cookieStorageAdapter) will fail. We don't need this assert, as it can be clearly incorrect, and there isn't harm in dispatching a message to nil if cookieStorageAdapter hasn't been defined yet. <rdar://problem/9178751>
Attachments
[PATCH] Fix (1.51 KB, patch)
2011-03-30 10:59 PDT, Brian Weinstein
no flags
[PATCH] Fix w/ early return + comment (1.76 KB, patch)
2011-03-30 11:06 PDT, Brian Weinstein
andersca: review+
Brian Weinstein
Comment 1 Wednesday, March 30, 2011 6:59:16 PM UTC
Created attachment 87575 [details] [PATCH] Fix
Jessie Berlin
Comment 2 Wednesday, March 30, 2011 7:01:49 PM UTC
Comment on attachment 87575 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=87575&action=review > Source/WebCore/platform/network/mac/CookieStorageMac.mm:119 > [cookieStorageAdapter stopListeningForCookieChangeNotifications]; I know that dispatching a message to nil won't crash, but I think it is very unclear here that it is ok for the cookieStorageAdapter to be null. I think a comment and an early return would be better.
Brian Weinstein
Comment 3 Wednesday, March 30, 2011 7:06:16 PM UTC
Created attachment 87576 [details] [PATCH] Fix w/ early return + comment
Jessie Berlin
Comment 4 Wednesday, March 30, 2011 7:07:20 PM UTC
Comment on attachment 87576 [details] [PATCH] Fix w/ early return + comment Unofficially, as I am not a reviewer, r=me.
Brian Weinstein
Comment 5 Wednesday, March 30, 2011 7:12:59 PM UTC
Landed in r82473.
Note You need to log in before you can comment on or make changes to this bug.