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.
Created attachment 212610 [details] Patch v1
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
Created attachment 212617 [details] Patch v2 The answer is - apparently - FeatureDefines.xcconfig. In four... different... places... *sigh*
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 on attachment 212617 [details] Patch v2 Attachment 212617 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/2260082
Created attachment 212626 [details] Patch v3 Okay, it's just the xcconfigs, and let's try this one last time.
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.
(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.
Building locally, will confirm it builds before landing (Patch v2 bot results are scary)
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.
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 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 on attachment 212626 [details] Patch v3 Attachment 212626 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/2237011
Andreas (maybe) fixed the build. Working on verifying and landing now.
Comment on attachment 212626 [details] Patch v3 Attachment 212626 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/2264035
http://trac.webkit.org/changeset/156432
Re-opened since this is blocked by bug 121932
Landed again in http://trac.webkit.org/changeset/156447