Bug 45815 - Allow the embedder to specify the base path for IndexedDB.
Summary: Allow the embedder to specify the base path for IndexedDB.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 04:43 PDT by Jeremy Orlow
Modified: 2010-09-16 04:28 PDT (History)
2 users (show)

See Also:


Attachments
Patch (14.36 KB, patch)
2010-09-15 04:48 PDT, Jeremy Orlow
steveblock: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-09-15 04:43:29 PDT
Allow the embedder to specify the base path for IndexedDB.
Comment 1 Jeremy Orlow 2010-09-15 04:48:10 PDT
Created attachment 67665 [details]
Patch
Comment 2 Andrei Popescu 2010-09-15 07:14:59 PDT
 WebKit/chromium/public/WebIDBFactory.h
> open(name, description, callbacks, origin, webFrame, "/tmp/temporary-indexed-db-files");

Why do we need the string at the end? Can it just be the empty string?
Comment 3 Jeremy Orlow 2010-09-15 07:19:27 PDT
(In reply to comment #2)
>  WebKit/chromium/public/WebIDBFactory.h
> > open(name, description, callbacks, origin, webFrame, "/tmp/temporary-indexed-db-files");
> 
> Why do we need the string at the end? Can it just be the empty string?

It's so things don't break mid-roll.  I'll then land the other half, and then we remove this.  Using this directory is actually the current behavior.
Comment 4 Steve Block 2010-09-16 03:14:00 PDT
Comment on attachment 67665 [details]
Patch

> +    String path = ":memory:";
Presumably this is a magic value interpreted by SQLiteDatabase? Isn't there a constant you can use for the string?
Comment 5 Jeremy Orlow 2010-09-16 03:20:11 PDT
(In reply to comment #4)
> (From update of attachment 67665 [details])
> > +    String path = ":memory:";
> Presumably this is a magic value interpreted by SQLiteDatabase? Isn't there a constant you can use for the string?

Even SQLite's internal code hard codes the string rather than using a constant, so I'm pretty sure not.
Comment 6 Steve Block 2010-09-16 03:22:39 PDT
Comment on attachment 67665 [details]
Patch

OK, probably not worth using a local constant for just a single use
Comment 7 Jeremy Orlow 2010-09-16 04:28:05 PDT
Committed r67605: <http://trac.webkit.org/changeset/67605>