Bug 909785 - Add SkipRoot for inline chars used by regexp r=terrence

This commit is contained in:
Jon Coppeard 2013-10-07 13:40:47 +01:00
parent 806a5de827
commit 4668939844

View File

@ -527,6 +527,9 @@ RegExpRunStatus
RegExpShared::execute(JSContext *cx, const jschar *chars, size_t length,
size_t *lastIndex, MatchPairs &matches)
{
/* Protect inlined chars from root analysis poisoning. */
SkipRoot skip(cx, &chars);
/* Compile the code at point-of-use. */
if (!compileIfNecessary(cx))
return RegExpRunStatus_Error;