Bug 159033

Summary: Only call sqlite3_initialize() when a SQLite database is actually being opened
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: PlatformAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, dbates, kling, koivisto
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-06-22 12:26:26 PDT
Only call sqlite3_initialize() when a SQLite database is actually being opened instead of doing it unconditionally.
Sqlite3_initialize() is currently called in the SQLiteDatabase constructor which gets called on WebContent process initialization because a DatabaseTracker is constructed on initialization and DatabaseTracker has a SQLiteDatabase data member.
Comment 1 Chris Dumez 2016-06-22 12:35:21 PDT
Created attachment 281860 [details]
Patch
Comment 2 Alex Christensen 2016-06-22 22:01:18 PDT
Brady will have to review this.  I have two questions:
Is it ok to assume that open is always going to be the first call on a SQLiteDatabase?  I think the answer is yes.
Should we even have databases in the WebProcess?
Comment 3 WebKit Commit Bot 2016-06-23 09:03:31 PDT
Comment on attachment 281860 [details]
Patch

Clearing flags on attachment: 281860

Committed r202379: <http://trac.webkit.org/changeset/202379>
Comment 4 WebKit Commit Bot 2016-06-23 09:03:35 PDT
All reviewed patches have been landed.  Closing bug.