Bug 1055402 - Remove RegExp.test cache, add a more robust match only mode to irregexp, r=jandem.
This commit is contained in:
@@ -402,22 +402,6 @@ js::AtomizeString(ExclusiveContext *cx, JSString *str,
|
||||
: AtomizeAndCopyChars(cx, linear->twoByteChars(nogc), linear->length(), ib);
|
||||
}
|
||||
|
||||
JSAtom *
|
||||
js::AtomizeSubstring(ExclusiveContext *cx, JSString *str, size_t start, size_t length,
|
||||
InternBehavior ib /* = DoNotInternAtom */)
|
||||
{
|
||||
JS_ASSERT(start + length <= str->length());
|
||||
|
||||
JSLinearString *linear = str->ensureLinear(cx);
|
||||
if (!linear)
|
||||
return nullptr;
|
||||
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
return linear->hasLatin1Chars()
|
||||
? AtomizeAndCopyChars(cx, linear->latin1Chars(nogc) + start, length, ib)
|
||||
: AtomizeAndCopyChars(cx, linear->twoByteChars(nogc) + start, length, ib);
|
||||
}
|
||||
|
||||
JSAtom *
|
||||
js::Atomize(ExclusiveContext *cx, const char *bytes, size_t length, InternBehavior ib)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user