Title: [91051] trunk/Source/WebKit/efl
Revision
91051
Author
[email protected]
Date
2011-07-14 23:07:29 -0700 (Thu, 14 Jul 2011)

Log Message

Patch by Jaehun Lim <[email protected]> on 2011-07-14
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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (91050 => 91051)


--- trunk/Source/WebKit/efl/ChangeLog	2011-07-15 05:58:44 UTC (rev 91050)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-07-15 06:07:29 UTC (rev 91051)
@@ -1,3 +1,20 @@
+2011-07-14  Jaehun Lim  <[email protected]>
+
+        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  <[email protected]>
 
         ApplicationCache update should not immediately fail when reaching per-origin quota

Modified: trunk/Source/WebKit/efl/ewk/ewk_main.cpp (91050 => 91051)


--- trunk/Source/WebKit/efl/ewk/ewk_main.cpp	2011-07-15 05:58:44 UTC (rev 91050)
+++ trunk/Source/WebKit/efl/ewk/ewk_main.cpp	2011-07-15 06:07:29 UTC (rev 91051)
@@ -198,7 +198,6 @@
     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());

Modified: trunk/Source/WebKit/efl/ewk/ewk_settings.cpp (91050 => 91051)


--- trunk/Source/WebKit/efl/ewk/ewk_settings.cpp	2011-07-15 05:58:44 UTC (rev 91050)
+++ trunk/Source/WebKit/efl/ewk/ewk_settings.cpp	2011-07-15 06:07:29 UTC (rev 91051)
@@ -140,6 +140,9 @@
 /**
  * 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
  *
@@ -150,6 +153,11 @@
     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)) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to