From: Taejeong Lee Date: Tue, 5 Mar 2013 06:23:11 +0000 (+0900) Subject: 'on_frame_unload' plugin's callback is not invoked when webapp is terminated. X-Git-Tag: 2.1b_release~22^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac1f5f0b00faa0eb3627010426ddf985cc57d46f;p=platform%2Fframework%2Fweb%2Fwrt.git 'on_frame_unload' plugin's callback is not invoked when webapp is terminated. [Issue#] N/A [Problem] 'on_frame_unload' plugin's callback is not invoked when webapp is terminated. [Cause] stopSession() doesn't call 'on_frame_unload' function. [Solution] changed to perform to erase a session at stopSession() only. [SCMRequest] This commit should be merged with wrt-plugins-common Change-Id: I155d42ac0058f5bf64ae2f87d2a829efec4736ac --- diff --git a/src/view/webkit/bundles/wrt-wk2-bundle.cpp b/src/view/webkit/bundles/wrt-wk2-bundle.cpp index 6d881de..44b173a 100644 --- a/src/view/webkit/bundles/wrt-wk2-bundle.cpp +++ b/src/view/webkit/bundles/wrt-wk2-bundle.cpp @@ -194,8 +194,9 @@ void Bundle::willDestroyPage(WKBundlePageRef page) auto context = m_pageGlobalContext[page]; m_pagesList.remove(page); m_pageGlobalContext.erase(page); - m_pageContext.erase(page); + m_pageContext[page].erase(context); + PluginModule::unloadFrame(context); PluginModule::stop(context); } @@ -450,13 +451,11 @@ void Bundle::didRemoveFrameFromHierarchyCallback( WKTypeRef* /*userData*/, const void *clientInfo) { - LogDebug("didFinishLoadForResourceCallback called"); + LogDebug("didRemoveFrameFromHierarchyCallback called"); Bundle* This = static_cast(const_cast(clientInfo)); - if (This->m_pageGlobalContext.count(page) == 0) { - return; - } if (This->m_pageContext.count(page) == 0) { + LogDebug("his->m_pageContext.count(page) == 0"); return; }