gecko-dev/js
nboyd%atg.com d30ebd31a8 Fix bug:
We have found a problem in string.replace() when replacing a regular
expression with a dollar sign. The following code works right when the
replacement string does not contain "$":

$ java -jar js.jar
js> var re = new RegExp("%%%");
js> var price = "%%% 1.99";
js> price.replace(re, "USD");
USD 1.99
js> price.replace(re, "$");
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
         at
org.mozilla.javascript.regexp.ReplaceData.interpretDollar(RegExpImpl.java:40 0)
         at
org.mozilla.javascript.regexp.ReplaceData.findReplen(RegExpImpl.java:502)
         at
org.mozilla.javascript.regexp.RegExpImpl.replace(RegExpImpl.java:116)
         at
org.mozilla.javascript.NativeString.execMethod(NativeString.java:266)
         at org.mozilla.javascript.IdFunction.call(IdFunction.java:78)
         at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1940)
         at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:68)
         at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:59)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:773)
         at
org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:312)
         at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java:219)
         at org.mozilla.javascript.tools.shell.Main.exec(Main.java:106)
         at org.mozilla.javascript.tools.shell.Main.main(Main.java:68)
2002-01-09 15:20:48 +00:00
..
benchmarks
jsd bug 117907, patch=joerg.schaible@gmx.de (J�rg Schaible), r=me 2002-01-04 19:24:14 +00:00
jsdj Bugzilla Bug 106386 rid source of these misspellings: persistant persistance priviledge protocal editting editted targetted targetting 2001-12-23 23:23:41 +00:00
jsj
macbuild Fix bug 114915 -- app not starting up in Mac opt builds. Work around a CodeWarrior optimizer bug by bumping down the optimization level for the optimized target. r=brendan, sr=shaver, a=Roto-rooter 2001-12-13 07:11:28 +00:00
ref
rhino Fix bug: 2002-01-09 15:20:48 +00:00
src Don't use C++ comments in C files. 2002-01-08 02:29:11 +00:00
tests Initial add. Regression test for bug 118849. 2002-01-09 01:09:15 +00:00
.cvsignore
landbranch.pl
Makefile.in bug 76050, build js/jsd from toplevel makefile so we're sure we've got an xpidl compiler. r=cls 2001-05-15 20:38:26 +00:00
makefile.win updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:40:37 +00:00