Reviewed by Adam Barth.
[EFL] Remove IconDatabase initialization in _ewk_init_body()
https://bugs.webkit.org/show_bug.cgi?id=63491
Make IconDatabase feature optional by removing its initialization from _ewk_init_body().
Now IconDatabase must be fully managed by an application:
if it doesn't want to use it, there's nothing to do. Otherwise, just call
ewk_settings_icon_database_path_set() with the directory path.
* ewk/ewk_main.cpp:
(_ewk_init_body):
* ewk/ewk_settings.cpp:
(ewk_settings_icon_database_path_set):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-07-14 Jaehun Lim <ljaehun.lim@samsung.com>
+
+ Reviewed by Adam Barth.
+
+ [EFL] Remove IconDatabase initialization in _ewk_init_body()
+ https://bugs.webkit.org/show_bug.cgi?id=63491
+
+ Make IconDatabase feature optional by removing its initialization from _ewk_init_body().
+ Now IconDatabase must be fully managed by an application:
+ if it doesn't want to use it, there's nothing to do. Otherwise, just call
+ ewk_settings_icon_database_path_set() with the directory path.
+
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_icon_database_path_set):
+
2011-07-12 Joseph Pecoraro <joepeck@webkit.org>
ApplicationCache update should not immediately fail when reaching per-origin quota
WTF::String wkdir = home + "/.webkit";
if (WebCore::makeAllDirectories(wkdir)) {
ewk_settings_web_database_path_set(wkdir.utf8().data());
- ewk_settings_icon_database_path_set(wkdir.utf8().data());
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
ewk_settings_cache_directory_path_set(wkdir.utf8().data());
/**
* Sets directory where to store icon database, opening or closing database.
*
+ * Icon database must be opened only once. If you try to set a path when the icon
+ * database is already open, this function returns @c EINA_FALSE.
+ *
* @param directory where to store icon database, must be
* write-able, if @c 0 is given, then database is closed
*
WebCore::IconDatabase::delayDatabaseCleanup();
if (directory) {
+ if (WebCore::iconDatabase().isEnabled()) {
+ ERR("IconDatabase is already open: %s", _ewk_icon_database_path);
+ return EINA_FALSE;
+ }
+
struct stat st;
if (stat(directory, &st)) {