Routine fixed to skip property table error generally
authorHojong Han <hojong.han@samsung.com>
Tue, 24 Sep 2013 00:04:56 +0000 (09:04 +0900)
committerHojong Han <hojong.han@samsung.com>
Tue, 24 Sep 2013 00:07:41 +0000 (09:07 +0900)
[Title] Routine fixed to skip property table error generally
[Issue#] N_SE-52881
[Problem] Crash occurred while opening new tabs and load new websites
[Cause] Property table information was corrupted
[Solution] Exception-handling routine fixed not to access invalid information

Change-Id: Ifa26e2e5dc2f264f5d33dd83efdee3c958d8956d

Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp
Source/JavaScriptCore/runtime/PropertyMapHashTable.h

index 5c6c3c1..5ef8acc 100644 (file)
@@ -58,6 +58,10 @@ static ResolveGlobalStatus computeForLLInt(CodeBlock* codeBlock, unsigned byteco
     Structure* structure = instruction[3].u.structure.get();
     if (!structure)
         return ResolveGlobalStatus();
+#if ENABLE(TIZEN_JSC_SKIP_PROPERTY_TABLE_ERROR)
+    if (structure->isZapped())
+        return ResolveGlobalStatus();
+#endif
     
     return computeForStructure(codeBlock, structure, identifier);
 #else
index d6a92c1..5953f5e 100644 (file)
@@ -338,11 +338,7 @@ 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);