mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Backed out changeset 2b10a37f9a23 (bug 1863390) for causing JSRope related SM bustages. CLOSED TREE
This commit is contained in:
parent
741d5e91ef
commit
95f0e10b39
@ -676,16 +676,6 @@ JSString* js::SubstringKernel(JSContext* cx, HandleString str, int32_t beginInt,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// The dependent string of a two-byte string can be a Latin-1 string, so
|
||||
// check again if the result fits into an inline string.
|
||||
if (left->hasLatin1Chars() && right->hasLatin1Chars()) {
|
||||
if (JSInlineString::lengthFits<Latin1Char>(len)) {
|
||||
MOZ_ASSERT(rope->hasTwoByteChars(), "Latin-1 ropes are handled above");
|
||||
return SubstringInlineString<Latin1Char>(cx, left, right, 0, lhsLength,
|
||||
rhsLength);
|
||||
}
|
||||
}
|
||||
|
||||
return JSRope::new_<CanGC>(cx, left, right, len);
|
||||
}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
var left = "left-rope-child";
|
||||
var right = newString("right-rope-child", {twoByte: true});
|
||||
var rope = newRope(left, right);
|
||||
var result = rope.substring(0, left.length + 1);
|
||||
|
||||
assertEq(result, "left-rope-childr");
|
Loading…
Reference in New Issue
Block a user