Bug 624971: RegExp sticky path assertion failure. (r=lw)
authorChris Leary <cdleary@mozilla.com>
Tue, 11 Jan 2011 22:27:29 -0800
changeset 60564 a1d376c7a962df3b0490a167c957374f919b7d50
parent 60563 a563a4dccc5684960e6199457d21f818edb3684a
child 60565 1b1ae38d5c3711e20bcd6ca2dd4eca4947ba1dea
push id18037
push usercleary@mozilla.com
push dateFri, 14 Jan 2011 17:42:55 +0000
treeherdermozilla-central@4e0501a0c5e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslw
bugs624971
milestone2.0b9pre
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
Bug 624971: RegExp sticky path assertion failure. (r=lw)
js/src/jsregexpinlines.h
--- a/js/src/jsregexpinlines.h
+++ b/js/src/jsregexpinlines.h
@@ -507,17 +507,17 @@ RegExp::compile(JSContext *cx)
      */
     static const jschar prefix[] = {'^', '(', '?', ':'};
     static const jschar postfix[] = {')'};
 
     JSCharBuffer cb(cx);
     if (!cb.reserve(JS_ARRAY_LENGTH(prefix) + source->length() + JS_ARRAY_LENGTH(postfix)))
         return false;
     JS_ALWAYS_TRUE(cb.append(prefix, JS_ARRAY_LENGTH(prefix)));
-    JS_ALWAYS_TRUE(cb.append(source->flatChars(), source->length()));
+    JS_ALWAYS_TRUE(cb.append(source->chars(), source->length()));
     JS_ALWAYS_TRUE(cb.append(postfix, JS_ARRAY_LENGTH(postfix)));
 
     JSLinearString *fakeySource = js_NewStringFromCharBuffer(cx, cb);
     if (!fakeySource)
         return false;
     return compileHelper(cx, *fakeySource);
 }