Chromium Code Reviews
DescriptionFix a crash during shutdown where SafeBrowsingProtocolManager could end up getting back NULL for Profile::GetDefaultRequestContext() and consequently URLFetcher would crash.
During shutdown the Profile is first deleted, and THEN the IO thread is torn down.
This means there is a window of time when Profile::GetDefaultRequestContext() will return NULL, but tasks are still running on the IO thread.
Instead, SafeBrowsingProtocolManager now gets passed an explicit context, and holds a reference throughout its lifetime.
This way it is guaranteed a valid pointer throughout the lifetime of the IO thread, even if the default Profile has already been deleted.
BUG=27074
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31821
Patch Set 1 #Patch Set 2 : Add unit test file #Patch Set 3 : Fix some nits #
Messages
Total messages: 2 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||