Commit 4387f7ff authored by darin's avatar darin

Reviewed by Brady.

        - fix crash seen when running JavaScriptCore tests

        * kjs/array_instance.cpp: (KJS::ArrayInstance::mark):
        Copy and paste error: I accidentally had code here that was
        making a copy of the HashMap -- that's illegal inside a mark
        function and was unnecessary. The other callsite was modifying
        the map as it iterated it, but this function is not.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 26d4b384
2007-10-22 Darin Adler <darin@apple.com>
Reviewed by Brady.
- fix crash seen when running JavaScriptCore tests
* kjs/array_instance.cpp: (KJS::ArrayInstance::mark):
Copy and paste error: I accidentally had code here that was
making a copy of the HashMap -- that's illegal inside a mark
function and was unnecessary. The other callsite was modifying
the map as it iterated it, but this function is not.
2007-10-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
......
......@@ -421,9 +421,8 @@ void ArrayInstance::mark()
}
if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap copy = *map;
SparseArrayValueMap::iterator end = copy.end();
for (SparseArrayValueMap::iterator it = copy.begin(); it != end; ++it) {
SparseArrayValueMap::iterator end = map->end();
for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it) {
JSValue* value = it->second;
if (!value->marked())
value->mark();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment