Routine added to skip property table error
authorHojong Han <hojong.han@samsung.com>
Thu, 8 Aug 2013 00:39:05 +0000 (09:39 +0900)
committerHojong Han <hojong.han@samsung.com>
Thu, 8 Aug 2013 00:41:58 +0000 (09:41 +0900)
[Title] Routine added to skip property table error
[Issue#] N_SE-48222
[Problem] Crash occurred while opening new tabs and load new websites
[Cause] Property table information was corrupted
[Solution] Exception-handling routine added not to access invalid information

Change-Id: I3e695b4d8edb15061a795bdf20680a89f9c5e1eb

Source/JavaScriptCore/runtime/PropertyMapHashTable.h
Source/WTF/wtf/Platform.h

index 5953f5e..d6a92c1 100644 (file)
@@ -338,7 +338,11 @@ inline PropertyTable::find_iterator PropertyTable::find(const KeyType& key)
 
     while (true) {
         unsigned entryIndex = m_index[hash & m_indexMask];
+#if ENABLE(TIZEN_JSC_SKIP_PROPERTY_TABLE_ERROR)
+        if (entryIndex == EmptyEntryIndex || m_indexMask != (m_indexSize - 1))
+#else
         if (entryIndex == EmptyEntryIndex)
+#endif
             return std::make_pair((ValueType*)0, hash & m_indexMask);
         if (key == table()[entryIndex - 1].key)
             return std::make_pair(&table()[entryIndex - 1], hash & m_indexMask);
index ec13002..5e46153 100755 (executable)
@@ -780,6 +780,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/
 #define ENABLE_TIZEN_DFG_STORE_CELL_TAG_FOR_ARGUMENTS 1 /* Hojong Han(hojong.han@samsung.com) : Store cell tag for arguments */
 #define ENABLE_TIZEN_JSC_CACHEFLUSH_PAGE_BY_PAGE 1 /* Hojong Han(hojong.han@samsung.com) : Fix YarrJIT crash */
 #define ENABLE_TIZEN_SET_PROPERTY_ATTRIBUTE_CORRECTLY 1 /* Hojong Han(hojong.han@samsung.com) : Fix overwritting Read-only property, set from WRT */
+#define ENABLE_TIZEN_JSC_SKIP_PROPERTY_TABLE_ERROR 1 /* Hojong Han(hojong.han@samsung.com) : Skip property table error */
 
 #define ENABLE_TIZEN_WRT_LAUNCHING_PERFORMANCE 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Local patches to enhance web app launching performance */