| Index: src/runtime/runtime-regexp.cc
|
| diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
|
| index 9a489ecff875464e7e6cb80dab09d3c935f2bd56..4fd2e37aa71958dd6e9612db40fe960ff00a9bf8 100644
|
| --- a/src/runtime/runtime-regexp.cc
|
| +++ b/src/runtime/runtime-regexp.cc
|
| @@ -431,6 +431,9 @@ MUST_USE_RESULT static Object* StringReplaceGlobalAtomRegExpWithString(
|
| } else {
|
| result_len = static_cast<int>(result_len_64);
|
| }
|
| + if (result_len == 0) {
|
| + return isolate->heap()->empty_string();
|
| + }
|
|
|
| int subject_pos = 0;
|
| int result_pos = 0;
|
|
|