Undepend regexp source string so error message formatted arg refs into it work (332472, r=mrbkap).

This commit is contained in:
brendan%mozilla.org 2006-04-02 19:07:49 +00:00
Родитель 878a413555
Коммит daee041a64
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1927,7 +1927,10 @@ js_NewRegExp(JSContext *cx, JSTokenStream *ts,
state.context = cx;
state.tokenStream = ts;
state.cpbegin = state.cp = JSSTRING_CHARS(str);
state.cp = js_UndependString(cx, str);
if (!state.cp)
goto out;
state.cpbegin = state.cp;
state.cpend = state.cp + len;
state.flags = flags;
state.parenCount = 0;