Bug 159033 - Only call sqlite3_initialize() when a SQLite database is actually being opened
Summary: Only call sqlite3_initialize() when a SQLite database is actually being opened
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-22 12:26 PDT by Chris Dumez
Modified: 2016-06-23 09:03 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.51 KB, patch)
2016-06-22 12:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.