Skip to content
Snippets Groups Projects
Commit 50184484 authored by dumi@chromium.org's avatar dumi@chromium.org
Browse files

The return value of ClosePlatformFile() was reversed in r59041. Most

calls to ClosePlatformFile() ignore the return value, but there are
two calls that do use it:

1. webkit/glue/webfileutilities_impl.cc, closeFile() method: i talked
to jianli who changed that method most recently, and he said he
prefers the handle to be reset to base::kInvalidPlatformFileValue if
ClosePlatformFile() succeeded, so no change is needed to that code.

2. webkit/database/database_tracker.cc, CloseIncognitoFileHandle():
this code needs to be updated.

TEST=WebSQLDBs don't crash in incognito mode.
BUG=56237

Review URL: http://codereview.chromium.org/3387018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60685 0039d316-1c4b-4281-b951-d872f2087c98
parent 0233759c
No related merge requests found
......@@ -97,7 +97,7 @@ PlatformFile CreatePlatformFile(const std::wstring& name,
int flags,
bool* created);
// Closes a file handle
// Closes a file handle. Returns |true| on success and |false| otherwise.
bool ClosePlatformFile(PlatformFile file);
// Reads the given number of bytes (or until EOF is reached) starting with the
......
......@@ -629,7 +629,7 @@ bool DatabaseTracker::CloseIncognitoFileHandle(const string16& vfs_file_name) {
bool handle_closed = false;
FileHandlesMap::iterator it = incognito_file_handles_.find(vfs_file_name);
if (it != incognito_file_handles_.end()) {
handle_closed = !base::ClosePlatformFile(it->second);
handle_closed = base::ClosePlatformFile(it->second);
if (handle_closed)
incognito_file_handles_.erase(it);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment