Chromium Code Reviews
DescriptionMerge 11262 - Fixes possible crash in SessionBackend. I believe what's happening
here is we fail to create the file, and so current_session_file_.get()
is NULL and we crash. current_session_file_.get() is NULL if
OpenAndWriteHeader returns NULL (which is does if the full header
isn't written correctly.
Here's how I'm changing the code:
. The file is now truncated instead of closed/reopened. Hopefully this avoids the possibility of a scanner locking the file and the delete failing.
. Added a unit test for coverage of truncation.
. The file is opened in exclusive access. There is no reason why a scanner should open this file.
. Added null checks.
BUG=8476
TEST=none
Review URL: http://codereview.chromium.org/39275
TBR=sky@chromium.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=11710
Patch Set 1 #Patch Set 2 : '' #
Messages
Total messages: 2 (0 generated)
|
|||||||||||||||||||||||||||||||||||||