WebSQL: Fix memory leak in SQLite VFS.

The ownership model for SandboxedVfs and SandboxedVfsFile is explained
in class comments. It is not straightforward (smart pointers) because
SandboxedVfs is tied to sqlite3_vfs and SandboxedVfsFile is tied to
sqlite3_file, which are under SQLite's control.

The class comment state that SandboxedVfsFile is deleted when Close() is
called, but the implementation did not do that. This CL fixes the
inconsistency, plugging a small memory leak.

Bug: 1010577, 1009234
Change-Id: I21c819b16e15868bebf6a1a06f1b8de776d100f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1843150
Commit-Queue: Joshua Bell <[email protected]>
Auto-Submit: Victor Costan <[email protected]>
Reviewed-by: Joshua Bell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#703462}
diff --git a/third_party/blink/renderer/modules/webdatabase/sqlite/sandboxed_vfs_file.cc b/third_party/blink/renderer/modules/webdatabase/sqlite/sandboxed_vfs_file.cc
index 2762ed8..afc4438 100644
--- a/third_party/blink/renderer/modules/webdatabase/sqlite/sandboxed_vfs_file.cc
+++ b/third_party/blink/renderer/modules/webdatabase/sqlite/sandboxed_vfs_file.cc
@@ -146,6 +146,7 @@
 
 int SandboxedVfsFile::Close() {
   file_.Close();
+  delete this;
   return SQLITE_OK;
 }