author | Paul Biggar <pbiggar@mozilla.com> |
Mon, 18 Jul 2011 14:32:47 -0700 | |
changeset 72975 | 52e36db1e8c7c8faba145c6ab78a1385c02f9523 |
parent 72974 | 102481f5e2b9d5d253c2bec545de05d6b4407d27 |
child 72976 | b3cfcf6f19286624b41e9d1adf1abf76ea24fa3e |
push id | 20799 |
push user | mak77@bonardo.net |
push date | Tue, 19 Jul 2011 12:30:13 +0000 |
treeherder | mozilla-central@b0a58fd855e1 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jwalden |
bugs | 671029 |
milestone | 8.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
|
--- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -393,17 +393,17 @@ SetContextOptions(JSContext *cx) } /* * Some UTF-8 files, notably those written using Notepad, have a Unicode * Byte-Order-Mark (BOM) as their first character. This is useless (byte-order * is meaningless for UTF-8) but causes a syntax error unless we skip it. */ static void -SkipUTF8BOM(FILE* file, size_t size) +SkipUTF8BOM(FILE* file) { if (!js_CStringsAreUTF8) return; int ch1 = fgetc(file); int ch2 = fgetc(file); int ch3 = fgetc(file); @@ -447,17 +447,17 @@ Process(JSContext *cx, JSObject *obj, ch return; } } SetContextOptions(cx); if (!forceTTY && !isatty(fileno(file))) { - SkipUTF8BOM(file, size); + SkipUTF8BOM(file); /* * It's not interactive - just execute it. * * Support the UNIX #! shell hack; gobble the first line if it starts * with '#'. TODO - this isn't quite compatible with sharp variables, * as a legal js program (using sharp variables) might start with '#'. * But that would require multi-character lookahead.