Codeblock doesn't visit cached structures in global resolve instructions
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 20:25:15 +0000 (20:25 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 20:25:15 +0000 (20:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64889

Reviewed by Sam Weinig.

Visit the global resolve instructions.  This fixes a couple
of random crashes seen in the jquery tests when using the
interpreter.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitAggregate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91394 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp

index 0799133..903a740 100644 (file)
@@ -1,3 +1,17 @@
+2011-07-20  Oliver Hunt  <oliver@apple.com>
+
+        Codeblock doesn't visit cached structures in global resolve instructions
+        https://bugs.webkit.org/show_bug.cgi?id=64889
+
+        Reviewed by Sam Weinig.
+
+        Visit the global resolve instructions.  This fixes a couple
+        of random crashes seen in the jquery tests when using the
+        interpreter.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::visitAggregate):
+
 2011-07-20  James Robinson  <jamesr@chromium.org>
 
         Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
index 30ca117..da7a057 100644 (file)
@@ -1555,6 +1555,8 @@ void CodeBlock::visitAggregate(SlotVisitor& visitor)
 #if ENABLE(INTERPRETER)
     for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i)
         visitStructures(visitor, &m_instructions[m_propertyAccessInstructions[i]]);
+    for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i)
+        visitStructures(visitor, &m_instructions[m_globalResolveInstructions[i]]);
 #endif
 #if ENABLE(JIT)
     for (size_t size = m_globalResolveInfos.size(), i = 0; i < size; ++i) {