Make ForInNode check for the timeout interrupt
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 00:24:54 +0000 (00:24 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 00:24:54 +0000 (00:24 +0000)
Reviewed by Anders

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

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/nodes.cpp

index b4663b7..39057f0 100644 (file)
@@ -1,3 +1,12 @@
+2008-03-03  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Anders.
+
+        Make ForInNode check for the timeout interrupt
+
+        * kjs/nodes.cpp:
+        (KJS::ForInNode::execute):
+
 2008-03-02  Brent Fulgham  <bfulgham@gmail.com>
 
         Reviewed by Alp Toker.
index b149d59..4607edc 100644 (file)
@@ -4028,6 +4028,9 @@ JSValue* ForInNode::execute(ExecState* exec)
         exec->popIteration();
         if (statementValue)
             value = statementValue;
+        
+        if (exec->dynamicGlobalObject()->timedOut())
+            return exec->setInterruptedCompletion();
 
         if (exec->completionType() != Normal) {
             if (exec->completionType() == Continue && m_labelStack.contains(exec->breakOrContinueTarget()))