[M42-Merge] ewk_context_application_cache_delete_all crashes on API tests
authorsihoons.yang <sihoons.yang@samsung.com>
Thu, 12 Nov 2015 07:03:00 +0000 (16:03 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
[issue] Segfault occurs when ewk_context_application_cache_delete_all
is called.

[cause] if ewk_context_application_cache_delete_all API call is faster
than AppCacheServiceImpl::Initialize, segmentation fault occurs.

[solution] ewk_context_application_cache_delete_all
API and AppCacheServiceImpl::Initialize are put the same thread.

M42 patch: http://165.213.202.130/gerrit/#/c/86735/4

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14127
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14128

Reviewed by: a1.gomes, hh4813.kim, sns.park

Change-Id: Id145919cbd1315a0c0a9950138dad59f467c71f2
Signed-off-by: sihoons.yang <sihoons.yang@samsung.com>
tizen_src/ewk/efl_integration/eweb_context.cc

index 82836b857a873e46cb249f5c6cc64e1ac5b0222e..db5d9a2763f09be3f8e4bb6183032c50da325ee6 100644 (file)
@@ -356,9 +356,9 @@ Ewk_Cookie_Manager* EWebContext::ewkCookieManager() {
 }
 
 void EWebContext::DeleteAllApplicationCache() {
-  if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+  if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
     BrowserThread::PostTask(
-        BrowserThread::UI, FROM_HERE,
+        BrowserThread::IO, FROM_HERE,
         base::Bind(&EWebContext::DeleteAllApplicationCache,
           base::Unretained(this)));
     return;