Bug 107182 - IndexedDB: Conditionalize usage of env_idb.h to fix build for non-Chromium ports
Summary: IndexedDB: Conditionalize usage of env_idb.h to fix build for non-Chromium ports
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: Martin Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-17 14:48 PST by Michael Pruett
Modified: 2013-01-17 20:05 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.44 KB, patch)
2013-01-17 15:47 PST, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (1.78 KB, patch)
2013-01-17 16:57 PST, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Pruett 2013-01-17 14:48:55 PST
Currently Source/WebCore/platform/leveldb/LevelDBDatabase.cpp includes <env_idb.h>. This file is available only for the Chromium port but an implementation should be made available for other ports.
Comment 1 Martin Robinson 2013-01-17 15:47:29 PST
Created attachment 183301 [details]
Patch
Comment 2 David Grogan 2013-01-17 15:49:18 PST
Comment on attachment 183301 [details]
Patch

lgtm
Comment 3 Martin Robinson 2013-01-17 16:02:32 PST
Thanks David. I'll wait for all the bubbles to turn green before committing this.
Comment 4 Tony Chang 2013-01-17 16:13:25 PST
Comment on attachment 183301 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183301&action=review

> Source/WebCore/platform/leveldb/LevelDBDatabase.cpp:58
> +#if PLATFORM(CHROMIUM)
> +static leveldb::Env* defaultLevelDBEnvironment()
> +{
> +    return leveldb::IDBEnv();
> +}
> +#else
> +static leveldb::Env* defaultLevelDBEnvironment()

Nit: Why not scope the #if around the return?
Comment 5 Martin Robinson 2013-01-17 16:22:11 PST
(In reply to comment #4)
> (From update of attachment 183301 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=183301&action=review
> 
> > Source/WebCore/platform/leveldb/LevelDBDatabase.cpp:58
> > +#if PLATFORM(CHROMIUM)
> > +static leveldb::Env* defaultLevelDBEnvironment()
> > +{
> > +    return leveldb::IDBEnv();
> > +}
> > +#else
> > +static leveldb::Env* defaultLevelDBEnvironment()
> 
> Nit: Why not scope the #if around the return?

Just my preference against having conditional compilation inside functions instead of surrounding them. Michael actually suggested a way to make this patch simpler, so I'll try that.
Comment 6 Martin Robinson 2013-01-17 16:57:24 PST
Created attachment 183318 [details]
Patch
Comment 7 Martin Robinson 2013-01-17 20:05:09 PST
Committed r140099: <http://trac.webkit.org/changeset/140099>