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>
Sun, 10 May 2009 13:18:01 -0700
changeset 28170 a6068cf686fe0b798ea92fc175919ffd98fe4e61
parent 28169 664431e6d306232a4b505fa6813f5c6839603d14
child 28188 e4fcfb2635ff60ff538b0688b5cd1d68caa3d624
push id6926
push userbrendan@mozilla.com
push dateSun, 10 May 2009 20:18:16 +0000
treeherdermozilla-central@a6068cf686fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs490818
milestone1.9.2a1pre
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 */