Bug 62638 - IndexedDB: Use fileExists() first when checking if SQLite db exists
Summary: IndexedDB: Use fileExists() first when checking if SQLite db exists
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hans Wennborg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 08:24 PDT by Hans Wennborg
Modified: 2011-06-15 06:57 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.77 KB, patch)
2011-06-14 08:27 PDT, Hans Wennborg
tonyg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>