Bug 121918 - Enable the IndexedDB build on Mac, but leave the feature non-functional
Summary: Enable the IndexedDB build on Mac, but leave the feature non-functional
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on: 121932
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-25 11:44 PDT by Brady Eidson
Modified: 2013-09-25 21:15 PDT (History)
8 users (show)

See Also:


Attachments
Patch v1 (18.35 KB, patch)
2013-09-25 11:46 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch v2 (22.19 KB, patch)
2013-09-25 12:26 PDT, Brady Eidson
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch v3 (22.20 KB, patch)
2013-09-25 14:18 PDT, Brady Eidson
ap: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2013-09-25 11:44:00 PDT
Enable the IndexedDB build on Mac, but leave the feature non-functional

It hinders development to switch back and forth between having the feature enabled and not having it enabled, so let's enable it.

But to keep it hidden from javascript while it is entirely non functional, we special-case the IDBFactory::create function to return null when the factory backend doesn't exist.

This way, javascript attempts to access window.indexedDB on Mac will return null even though the feature exists in the build.
Comment 1 Brady Eidson 2013-09-25 11:46:08 PDT
Created attachment 212610 [details]
Patch v1
Comment 2 Alexey Proskuryakov 2013-09-25 11:48:23 PDT
Comment on attachment 212610 [details]
Patch v1

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

> Source/WTF/wtf/FeatureDefines.h:227
> +#if !defined(ENABLE_INDEXED_DATABASE)
> +#define ENABLE_INDEXED_DATABASE 1
> +#endif

I never know if one is supposed to use FeatureDefines.h, or FeatureDefines.xcconfig
Comment 3 Brady Eidson 2013-09-25 12:26:02 PDT
Created attachment 212617 [details]
Patch v2 

The answer is - apparently - FeatureDefines.xcconfig.

In four... different... places...  *sigh*
Comment 4 Build Bot 2013-09-25 12:58:46 PDT
Comment on attachment 212617 [details]
Patch v2 

Attachment 212617 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/2169243
Comment 5 Build Bot 2013-09-25 13:24:17 PDT
Comment on attachment 212617 [details]
Patch v2 

Attachment 212617 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2260082
Comment 6 Brady Eidson 2013-09-25 14:18:24 PDT
Created attachment 212626 [details]
Patch v3

Okay, it's just the xcconfigs, and let's try this one last time.
Comment 7 WebKit Commit Bot 2013-09-25 14:19:43 PDT
Attachment 212626 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig', u'Source/WebCore/ChangeLog', u'Source/WebCore/Configurations/FeatureDefines.xcconfig', u'Source/WebCore/Modules/indexeddb/IDBFactory.h', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/Configurations/FeatureDefines.xcconfig', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Configurations/FeatureDefines.xcconfig']" exit_code: 1
Source/WebCore/Modules/indexeddb/IDBFactory.h:53:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebCore/Modules/indexeddb/IDBFactory.h:54:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebCore/Modules/indexeddb/IDBFactory.h:55:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebCore/Modules/indexeddb/IDBFactory.h:56:  Tab found; better to use spaces  [whitespace/tab] [1]
Total errors found: 4 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Brady Eidson 2013-09-25 14:21:45 PDT
(In reply to comment #7)
> Attachment 212626 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig', u'Source/WebCore/ChangeLog', u'Source/WebCore/Configurations/FeatureDefines.xcconfig', u'Source/WebCore/Modules/indexeddb/IDBFactory.h', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/Configurations/FeatureDefines.xcconfig', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Configurations/FeatureDefines.xcconfig']" exit_code: 1
> Source/WebCore/Modules/indexeddb/IDBFactory.h:53:  Tab found; better to use spaces  [whitespace/tab] [1]
> Source/WebCore/Modules/indexeddb/IDBFactory.h:54:  Tab found; better to use spaces  [whitespace/tab] [1]
> Source/WebCore/Modules/indexeddb/IDBFactory.h:55:  Tab found; better to use spaces  [whitespace/tab] [1]
> Source/WebCore/Modules/indexeddb/IDBFactory.h:56:  Tab found; better to use spaces  [whitespace/tab] [1]
> Total errors found: 4 in 9 files
> 

That'll teach me to use my non-default editor...  will fix.
Comment 9 Brady Eidson 2013-09-25 14:25:23 PDT
Building locally, will confirm it builds before landing (Patch v2 bot results are scary)
Comment 10 Brady Eidson 2013-09-25 14:54:59 PDT
The build failure was caused by Andreas' work in https://bugs.webkit.org/show_bug.cgi?id=121915

He didn't notice that he caused a build failure because - for him - the IndexedDB build was not enabled!

CC'ing him here.
Comment 11 Brady Eidson 2013-09-25 14:55:53 PDT
There's not an obvious correct solution since I don't know precisely what he was trying to do with that patch, but there is a 1 line build fix that will work in the meantime.
Comment 12 Build Bot 2013-09-25 14:56:29 PDT
Comment on attachment 212626 [details]
Patch v3

Attachment 212626 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/2286017
Comment 13 Build Bot 2013-09-25 15:23:42 PDT
Comment on attachment 212626 [details]
Patch v3

Attachment 212626 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2237011
Comment 14 Brady Eidson 2013-09-25 15:55:19 PDT
Andreas (maybe) fixed the build.  Working on verifying and landing now.
Comment 15 Build Bot 2013-09-25 16:18:48 PDT
Comment on attachment 212626 [details]
Patch v3

Attachment 212626 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2264035
Comment 16 Brady Eidson 2013-09-25 16:21:40 PDT
http://trac.webkit.org/changeset/156432
Comment 17 WebKit Commit Bot 2013-09-25 17:57:49 PDT
Re-opened since this is blocked by bug 121932
Comment 18 Brady Eidson 2013-09-25 21:15:48 PDT
Landed again in http://trac.webkit.org/changeset/156447