Commit Graph

3 Commits

Author SHA1 Message Date
Joshua Litt
69314b4272 [replaceAll] Fix replaceAll overflow with StringCompareSequence.
Fixes a potential overflow when using the runtime's StringCompareSequence
by checking the string length first.

Bug: chromium:1032906
Change-Id: I7cb94473ae8331dd2ecf1fa98034829bebf8a9ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1973936
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65558}
2019-12-26 18:47:05 +00:00
Joshua Litt
d442c4310e [replaceAll] Fix DCHECK hit in runtime with replaceAll.
Bug: chromium:1028475
Change-Id: I0101930e01d41b0f29fa28a257e3dc720069faff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1936835
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65214}
2019-11-27 15:53:27 +00:00
Joshua Litt
94890a0d46 [replaceAll] Implement String.prototype.replaceAll.
Implements TC39 String.prototype.replaceAll as a torque
builtin per the https://github.com/tc39/proposal-string-replaceall
proposal.

Note: matchAll changes were already added to V8 in https://chromium-review.googlesource.com/c/v8/v8/+/1846067

Bug: v8:9801
Change-Id: Ib8158eb39c854202d04710d6f9c33dcdd93fad93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1877054
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64785}
2019-11-05 19:00:29 +00:00