Bug 490818 - Packed JS that works in Firefox 3.0 and all other browsers fails in Firefox 3.5 (r=mrbkap).
authorBrendan Eich <brendan@mozilla.org>
Fri, 08 May 2009 14:00:56 -0700
changeset 25277 4bc0a36de5678c396d1986c29dabdbdbe24c89c0
parent 25276 5191386baa44580ce135ba17007b248cca39e235
child 25278 d223c3b7f6b3c1e0497eb95d9277bf76701de5e6
push id1436
push userrsayre@mozilla.com
push dateSat, 16 May 2009 16:32:10 +0000
reviewersmrbkap
bugs490818
milestone1.9.1b5pre
Bug 490818 - Packed JS that works in Firefox 3.0 and all other browsers fails in Firefox 3.5 (r=mrbkap).
js/src/jsscan.h
--- a/js/src/jsscan.h
+++ b/js/src/jsscan.h
@@ -224,18 +224,18 @@ js_AppendCString(JSStringBuffer *sb, con
 
 extern void
 js_AppendUCString(JSStringBuffer *sb, const jschar *buf, uintN len);
 
 extern void
 js_AppendJSString(JSStringBuffer *sb, JSString *str);
 
 struct JSTokenPtr {
-    uint16              index;          /* index of char in physical line */
-    uint16              lineno;         /* physical line number */
+    uint32              index;          /* index of char in physical line */
+    uint32              lineno;         /* physical line number */
 
     bool operator <(const JSTokenPtr& bptr) {
         return lineno < bptr.lineno ||
                (lineno == bptr.lineno && index < bptr.index);
     }
 
     bool operator <=(const JSTokenPtr& bptr) {
         return lineno < bptr.lineno ||
@@ -311,18 +311,18 @@ typedef struct JSTokenBuf {
 struct JSTokenStream {
     JSToken             tokens[NTOKENS];/* circular token buffer */
     uintN               cursor;         /* index of last parsed token */
     uintN               lookahead;      /* count of lookahead tokens */
     uintN               lineno;         /* current line number */
     uintN               ungetpos;       /* next free char slot in ungetbuf */
     jschar              ungetbuf[6];    /* at most 6, for \uXXXX lookahead */
     uintN               flags;          /* flags -- see below */
-    ptrdiff_t           linelen;        /* physical linebuf segment length */
-    ptrdiff_t           linepos;        /* linebuf offset in physical line */
+    uint32              linelen;        /* physical linebuf segment length */
+    uint32              linepos;        /* linebuf offset in physical line */
     JSTokenBuf          linebuf;        /* line buffer for diagnostics */
     JSTokenBuf          userbuf;        /* user input buffer if !file */
     JSStringBuffer      tokenbuf;       /* current token string buffer */
     const char          *filename;      /* input filename or null */
     FILE                *file;          /* stdio stream if reading from file */
     JSSourceHandler     listener;       /* callback for source; eg debugger */
     void                *listenerData;  /* listener 'this' data */
     void                *listenerTSData;/* listener data for this TokenStream */