Bug 104741

Summary: webdatabase: Encapsulate externally used DB APIs in DatabaseManager
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: WebCore Misc.Assignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, beidson, dglazkov, gyuyoung.kim, japhet, mifenton, peter+ews, philn, rakuco, rwlbuis, sam, tonikitoo, webkit.review.bot, xan.lopez, yong.li.webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 103668, 104748    
Attachments:
Description Flags
The patch.
webkit.review.bot: commit-queue-
Fixed a few issues, and let's retry with the EWS bots.
none
svn up'ed to get the patch to apply properly.
webkit.review.bot: commit-queue-
Fix bug in chromium port.
eflews.bot: commit-queue-
5th time's the charm: svn up, updated ChangeLog comments.
eflews.bot: commit-queue-
Added a #include to make the elf port happy. Also updated ChangeLog dates and fixed a typo.
none
svn up again to get the patch to apply. sam: review+

Description Mark Lam 2012-12-11 16:41:29 PST
Introduce a DatabaseManager module to encapsulate APIs that are called by code outside the webdatabase module.
Comment 1 Mark Lam 2012-12-11 20:53:53 PST
Created attachment 178956 [details]
The patch.

Let's see how the EWS bots like it.
Comment 2 WebKit Review Bot 2012-12-11 21:09:13 PST
Comment on attachment 178956 [details]
The patch.

Attachment 178956 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15277436
Comment 3 Peter Beverloo (cr-android ews) 2012-12-11 21:11:26 PST
Comment on attachment 178956 [details]
The patch.

Attachment 178956 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/15272574
Comment 4 Build Bot 2012-12-11 21:17:15 PST
Comment on attachment 178956 [details]
The patch.

Attachment 178956 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15284279
Comment 5 EFL EWS Bot 2012-12-11 22:40:52 PST
Comment on attachment 178956 [details]
The patch.

Attachment 178956 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/15281352
Comment 6 Mark Lam 2012-12-11 23:48:00 PST
Created attachment 178981 [details]
Fixed a few issues, and let's retry with the EWS bots.
Comment 7 Mark Lam 2012-12-12 00:02:12 PST
Created attachment 178984 [details]
svn up'ed to get the patch to apply properly.
Comment 8 WebKit Review Bot 2012-12-12 00:14:43 PST
Comment on attachment 178984 [details]
svn up'ed to get the patch to apply properly.

Attachment 178984 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15300001
Comment 9 Peter Beverloo (cr-android ews) 2012-12-12 00:23:43 PST
Comment on attachment 178984 [details]
svn up'ed to get the patch to apply properly.

Attachment 178984 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/15276572
Comment 10 Mark Lam 2012-12-12 00:24:13 PST
Created attachment 178988 [details]
Fix bug in chromium port.
Comment 11 EFL EWS Bot 2012-12-12 02:14:26 PST
Comment on attachment 178988 [details]
Fix bug in chromium port.

Attachment 178988 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/15272699
Comment 12 Mark Lam 2012-12-12 07:25:02 PST
Created attachment 179035 [details]
5th time's the charm: svn up, updated ChangeLog comments.

Let's retry the EWS bots after an svn up to see if the gtk and elf issues are resolved.  The failures from the last patch do not seem to be related to the patch.
Comment 13 EFL EWS Bot 2012-12-12 09:23:36 PST
Comment on attachment 179035 [details]
5th time's the charm: svn up, updated ChangeLog comments.

Attachment 179035 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/15286339
Comment 14 Mark Lam 2012-12-12 09:47:55 PST
Created attachment 179070 [details]
Added a #include to make the elf port happy.  Also updated ChangeLog dates and fixed a typo.
Comment 15 Mark Lam 2012-12-12 10:24:01 PST
Comment on attachment 179070 [details]
Added a #include to make the elf port happy.  Also updated ChangeLog dates and fixed a typo.

Ready for a review.  The elf ews will take a while to process.  It was previously complaining about CString only being forward declared.  The added #include <wtf/text/CString.h> should take care of the issue.
Comment 16 Mark Lam 2012-12-12 12:48:29 PST
Created attachment 179105 [details]
svn up again to get the patch to apply.
Comment 17 Mark Lam 2012-12-12 15:07:32 PST
Landed in r137520: <http://trac.webkit.org/changeset/137520>.
Comment 18 Mark Lam 2012-12-12 16:04:36 PST
aklein reported that r137520 is causing a build breakage in chromium:

Undefined symbols:
  "__ZN7WebCore15DatabaseTracker17initializeTrackerERKN3WTF6StringE", referenced from:
      __ZN7WebCore15DatabaseManager10initializeERKN3WTF6StringE in libwebcore_remaining.a(DatabaseManager.o)
ld: symbol(s) not found

The issue is because chromium does not use the same DatabaseTracker class, and hence does not have nor need the call to DatabaseTracker::initializeTracker() function.

The fix is landed in r137530: <http://trac.webkit.org/changeset/137530>.
Comment 19 Michael Nordman 2013-01-31 17:08:23 PST
Comment on attachment 178988 [details]
Fix bug in chromium port.

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

> Source/WebCore/WebCore.gypi:990
> +            'Modules/webdatabase/DatabaseManager.cpp',

Please add .h files to webcore.gyi as well when adding new files to webcore.

We generally add all files to this gypi, including .cpp files that we actually exclude from our build further downstream (in WebCore.gpy/WebCore.gyp).