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:
parent
97954982e9
commit
7dab8db09d
@ -3922,7 +3922,6 @@ JSBool
|
|||||||
js_regexp_toString(JSContext *cx, JSObject *obj, jsval *vp)
|
js_regexp_toString(JSContext *cx, JSObject *obj, jsval *vp)
|
||||||
{
|
{
|
||||||
JSRegExp *re;
|
JSRegExp *re;
|
||||||
JSString *escstr;
|
|
||||||
const jschar *source;
|
const jschar *source;
|
||||||
jschar *chars;
|
jschar *chars;
|
||||||
size_t length, nflags;
|
size_t length, nflags;
|
||||||
@ -3939,11 +3938,7 @@ js_regexp_toString(JSContext *cx, JSObject *obj, jsval *vp)
|
|||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
escstr = js_QuoteString(cx, re->source, 0);
|
JSSTRING_CHARS_AND_LENGTH(re->source, source, length);
|
||||||
if (!escstr)
|
|
||||||
return JS_FALSE;
|
|
||||||
*vp = STRING_TO_JSVAL(escstr); /* use vp for rooting */
|
|
||||||
JSSTRING_CHARS_AND_LENGTH(escstr, source, length);
|
|
||||||
if (length == 0) {
|
if (length == 0) {
|
||||||
source = empty_regexp_ucstr;
|
source = empty_regexp_ucstr;
|
||||||
length = JS_ARRAY_LENGTH(empty_regexp_ucstr) - 1;
|
length = JS_ARRAY_LENGTH(empty_regexp_ucstr) - 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user