'on_frame_unload' plugin's callback is not invoked when webapp is terminated.
authorTaejeong Lee <taejeong.lee@samsung.com>
Tue, 5 Mar 2013 06:23:11 +0000 (15:23 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Fri, 8 Mar 2013 02:04:47 +0000 (11:04 +0900)
[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

src/view/webkit/bundles/wrt-wk2-bundle.cpp

index 6d881de..44b173a 100644 (file)
@@ -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<Bundle*>(const_cast<void*>(clientInfo));
 
-    if (This->m_pageGlobalContext.count(page) == 0) {
-        return;
-    }
     if (This->m_pageContext.count(page) == 0) {
+        LogDebug("his->m_pageContext.count(page) == 0");
         return;
     }