Bug 1143194 - Skip JSTRY_FOR_OF when unwinding exceptions. (r=jorendorff)
authorShu-yu Guo <shu@rfrn.org>
Sat, 21 Mar 2015 14:11:14 -0700
changeset 263790 12df53d34b7414c43afeb2ab59cc30f2419bbe2d
parent 263789 5ff1e40be5f98b47eb094eb1e6c3ddf9063e6f94
child 263791 e9de10ff67c550e43d2a6206a2c47e9729244c5b
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1143194
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1143194 - Skip JSTRY_FOR_OF when unwinding exceptions. (r=jorendorff)
js/src/jit/JitFrames.cpp
js/src/vm/Interpreter.cpp
--- a/js/src/jit/JitFrames.cpp
+++ b/js/src/jit/JitFrames.cpp
@@ -460,16 +460,17 @@ HandleExceptionIon(JSContext *cx, const 
             MOZ_ASSERT(JSOp(*(script->main() + tn->start + tn->length)) == JSOP_ENDITER);
             MOZ_ASSERT(tn->stackDepth > 0);
 
             uint32_t localSlot = tn->stackDepth;
             CloseLiveIterator(cx, frame, localSlot);
             break;
           }
 
+          case JSTRY_FOR_OF:
           case JSTRY_LOOP:
             break;
 
           case JSTRY_CATCH:
             if (cx->isExceptionPending()) {
                 // Ion can compile try-catch, but bailing out to catch
                 // exceptions is slow. Reset the warm-up counter so that if we
                 // catch many exceptions we won't Ion-compile the script.
@@ -671,16 +672,17 @@ HandleExceptionBaseline(JSContext *cx, c
             RootedObject iterObject(cx, &iterValue.toObject());
             if (cx->isExceptionPending())
                 UnwindIteratorForException(cx, iterObject);
             else
                 UnwindIteratorForUncatchableException(cx, iterObject);
             break;
           }
 
+          case JSTRY_FOR_OF:
           case JSTRY_LOOP:
             break;
 
           default:
             MOZ_CRASH("Invalid try note");
         }
     }
 
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1157,16 +1157,17 @@ HandleError(JSContext *cx, InterpreterRe
                 RootedObject obj(cx, &regs.sp[-1].toObject());
                 bool ok = UnwindIteratorForException(cx, obj);
                 regs.sp -= 1;
                 if (!ok)
                     goto again;
                 break;
               }
 
+              case JSTRY_FOR_OF:
               case JSTRY_LOOP:
                 break;
             }
         }
 
         /*
          * Propagate the exception or error to the caller unless the exception
          * is an asynchronous return from a generator.