Bug 362582: reverting the patch from this bug as a result of test-failures

git-svn-id: svn://10.0.0.236/trunk@249974 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
crowder%fiverocks.com 2008-04-10 12:59:21 +00:00
parent 97954982e9
commit 7dab8db09d

View File

@ -3922,7 +3922,6 @@ JSBool
js_regexp_toString(JSContext *cx, JSObject *obj, jsval *vp)
{
JSRegExp *re;
JSString *escstr;
const jschar *source;
jschar *chars;
size_t length, nflags;
@ -3939,11 +3938,7 @@ js_regexp_toString(JSContext *cx, JSObject *obj, jsval *vp)
return JS_TRUE;
}
escstr = js_QuoteString(cx, re->source, 0);
if (!escstr)
return JS_FALSE;
*vp = STRING_TO_JSVAL(escstr); /* use vp for rooting */
JSSTRING_CHARS_AND_LENGTH(escstr, source, length);
JSSTRING_CHARS_AND_LENGTH(re->source, source, length);
if (length == 0) {
source = empty_regexp_ucstr;
length = JS_ARRAY_LENGTH(empty_regexp_ucstr) - 1;