Update change log and spec for wrt-plugins-tizen_0.4.78
authorHyunju Cheon <hyunju.cheon@samsung.com>
Tue, 5 Nov 2013 12:29:44 +0000 (21:29 +0900)
committerHyunju Cheon <hyunju.cheon@samsung.com>
Tue, 5 Nov 2013 12:29:44 +0000 (21:29 +0900)
[model] REDWOOD

[binary_type] PDA

[customer] OPEN

[Bookmark] Fix crash of Bookmark TCT

[Issue] N/A
[Problem] crash during testing Bookmark TCT
[Cause] std::multimap::find returns an iterator to multimap::end if an element with specific key doesn't exist. But it doesn't check whether return value is multimap::end or not.
[Solution] It will check whether the return value is multimap::end or not.
[SCMRequest] N/A

[team] WebAPI
[request] N/A
[horizontal_expansion] N/A

Change-Id: Iae269f22ad4d81be002d67ea2fb4ce6e1a97fca2

packaging/wrt-plugins-tizen.spec
src/Bookmark/BookmarkManager.cpp

index ab379e1..f7bf987 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.4.77
+Version:    0.4.78
 Release:    0
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index c5eb25b..302cf44 100644 (file)
@@ -142,23 +142,27 @@ std::vector<BookmarkDataPtr> BookmarkManager::_getCompleteCB(BookmarkSearchDataP
                                LoggerD("end's first:"<<((searchData->m_results).rbegin())->first << "end's second:"<<lastItemId);
                                while (1) {
                                        it = (searchData->m_results).find(parent->m_id);
-                                       LoggerD("it->first:"<<it->first << " parent->m_id:" <<parent->m_id);
-                                       while (it->first == parent->m_id) {
-                                               LoggerD("it->second:"<<(it->second)->m_id);
-                                               bookmarkArray.push_back(it->second);
-                                               LoggerD("m_type:"<<(it->second)->m_type);
-                                               //if it is folder, it will be pushed in folders vector
-                                               if ((it->second)->m_type == BOOKMARKFOLDER_TYPE)
-                                                       folders.push((it->second).get());
 
-                                               if ((it->second)->m_id != lastItemId) {
-                                                       LoggerD("not last item");
-                                                       it++;
-                                                       LoggerD("it->first:"<<it->first << " it->second:" <<(it->second)->m_id);
-                                               } else
-                                                       break;
-                                               
-                                       }
+                                       if (it != (searchData->m_results).end()) {
+                                               LoggerD("it->first:"<<it->first << " parent->m_id:" <<parent->m_id);
+                                               while (it->first == parent->m_id) {
+                                                       LoggerD("it->second:"<<(it->second)->m_id);
+                                                       bookmarkArray.push_back(it->second);
+                                                       LoggerD("m_type:"<<(it->second)->m_type);
+                                                       //if it is folder, it will be pushed in folders vector
+                                                       if ((it->second)->m_type == BOOKMARKFOLDER_TYPE)
+                                                               folders.push((it->second).get());
+
+                                                       if ((it->second)->m_id != lastItemId) {
+                                                               LoggerD("not last item");
+                                                               it++;
+                                                               LoggerD("it->first:"<<it->first << " it->second:" <<(it->second)->m_id);
+                                                       } else
+                                                               break;
+                                                       
+                                               }
+                                       } else
+                                               LoggerD("Not Found");
 
                                        if (folders.size()) {
                                                parent = folders.front();