bug 678457 - remove assert about a pending exception in the scanner as OOM does not throw. r=luke
authorIgor Bukanov <igor@mir2.org>
Fri, 12 Aug 2011 10:15:29 +0200
changeset 74366 779fe0db869b89243d526deea3652b3636d08658
parent 74365 a68442b5ff5c5f9b12c4c95d77b5467e92a36c5e
child 74367 1127ccbf8f4eebdd06023eb4097bee5c3d62f063
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersluke
bugs678457
milestone8.0a1
bug 678457 - remove assert about a pending exception in the scanner as OOM does not throw. r=luke
js/src/jsscan.cpp
--- a/js/src/jsscan.cpp
+++ b/js/src/jsscan.cpp
@@ -2126,18 +2126,16 @@ TokenStream::getTokenInternal()
   out:
     flags |= TSF_DIRTYLINE;
     tp->pos.end.index = userbuf.addressOfNextRawChar() - linebase;
     tp->type = tt;
     JS_ASSERT(IsTokenSane(tp));
     return tt;
 
   error:
-    JS_ASSERT(cx->isExceptionPending());
-
     /*
      * For erroneous multi-line tokens we won't have changed end.lineno (it'll
      * still be equal to begin.lineno) so we revert end.index to be equal to
      * begin.index + 1 (as if it's a 1-char token) to avoid having inconsistent
      * begin/end positions.  end.index isn't used in error messages anyway.
      */
     flags |= TSF_DIRTYLINE;
     tp->pos.end.index = tp->pos.begin.index + 1;