Bug 121918

Summary: Enable the IndexedDB build on Mac, but leave the feature non-functional
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, benjamin, buildbot, cmarcelo, commit-queue, jsbell, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Bug Depends on: 121932    
Bug Blocks:    
Attachments:
Description Flags
Patch v1
none
Patch v2
buildbot: commit-queue-
Patch v3 ap: review+, buildbot: commit-queue-

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