Bug 62638

Summary: IndexedDB: Use fileExists() first when checking if SQLite db exists
Product: WebKit Reporter: Hans Wennborg <hans>
Component: New BugsAssignee: Hans Wennborg <hans>
Status: RESOLVED FIXED    
Severity: Normal CC: dgrogan, tonyg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch tonyg: review+

Description Hans Wennborg 2011-06-14 08:24:37 PDT
IndexedDB: Use fileExists() first when checking if SQLite db exists
Comment 1 Hans Wennborg 2011-06-14 08:27:25 PDT
Created attachment 97123 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-06-14 08:42:26 PDT
Comment on attachment 97123 [details]
Patch

So this is a redundant check?  We were already checking this at a lower layer, but this is a nicer place to check?  I'm confused.  what happens if you call db.open() with a non-existant path?
Comment 3 Hans Wennborg 2011-06-14 08:47:56 PDT
(In reply to comment #2)
> (From update of attachment 97123 [details])
> So this is a redundant check?  We were already checking this at a lower layer, but this is a nicer place to check? I'm confused.  what happens if you call db.open() with a non-existant path?

It does a LOG_ERROR about failing to open the file, and returns false.

It's not a big deal, but I'd like to get those errors removed from my console.
Comment 4 David Grogan 2011-06-14 14:44:47 PDT
LGTM
Comment 5 Hans Wennborg 2011-06-15 06:57:36 PDT
Committed r88925: <http://trac.webkit.org/changeset/88925>