v8/test
jgruber d74a9fd595 [regexp] Fix invalid lastIndex handling in RegExp.p[@@replace]
The RegExp replace implementation is a bit of a mess. Here, we first
try to handle parts of RegExp.p.exec, and then call directly into the
raw irregexp code (skipping RegExp.p.exec).

We got parts of this wrong: when lastIndex > string.length and the
regexp instance is sticky, two things should happen. 1. The match
should fail, and 2. lastIndex should be reset to 0. On the fast path,
we did the latter but not the former, instead running exec with a
lastIndex of 0.

This CL omits the irregexp call in this case, and defaults to a failed
match instead.

Bug: chromium:875493
Change-Id: I8c959610d267575e37686076a3fd5dfde322f0ca
Reviewed-on: https://chromium-review.googlesource.com/1180889
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55207}
2018-08-20 10:25:39 +00:00
..
benchmarks Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
cctest Reland "[asmjs] Properly validate asm.js heap sizes" 2018-08-17 12:49:21 +00:00
common [wasm] Add WasmFeatures to enable/detect features 2018-08-09 10:58:22 +00:00
debugger [debug] remove break_id 2018-08-13 08:48:34 +00:00
fuzzer Reland "[wasm] Implement the new API for WebAssembly.instantiateStreaming" 2018-08-14 08:20:19 +00:00
inspector [inspector] added V8InspectorClient::resourceNameToUrl 2018-08-09 21:36:24 +00:00
intl [Intl] Use JSObject with null proto to prevent side effects 2018-08-10 18:37:41 +00:00
js-perf-test [parser] Adding more parsing js-perf tests 2018-08-20 08:56:14 +00:00
memory [builtins] Add embedded stats to --serialization-statistics 2018-07-05 12:33:26 +00:00
message Reland "[asmjs] Properly validate asm.js heap sizes" 2018-08-17 12:49:21 +00:00
mjsunit [regexp] Fix invalid lastIndex handling in RegExp.p[@@replace] 2018-08-20 10:25:39 +00:00
mkgrokdump Implement global proposal 2018-08-16 11:07:21 +00:00
mozilla Roll ICU to ICU 62.1 2018-07-11 10:24:26 +00:00
preparser Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
test262 Revert "[builtins] Enable Torque Array.prototype.splice" 2018-08-09 07:29:14 +00:00
torque [torque] only expose safe FixedArray allocation 2018-08-13 15:58:17 +00:00
unittests [api][runtime] Support all-in ctors of {Named,Indexed}PropertyHandlerConfiguration 2018-08-15 21:28:09 +00:00
wasm-spec-tests [wasm] Update spec tests 2018-07-26 09:54:02 +00:00
webkit [test] Bump shards on slow arm64 trybot 2018-08-10 14:22:01 +00:00
BUILD.gn Reland "[test] Add logic to run tests on Android" 2018-08-10 17:56:12 +00:00