Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/string.cc')
-rw-r--r--deps/v8/src/objects/string.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/deps/v8/src/objects/string.cc b/deps/v8/src/objects/string.cc
index 8c96900bbe0..90abd00ebac 100644
--- a/deps/v8/src/objects/string.cc
+++ b/deps/v8/src/objects/string.cc
@@ -6,7 +6,8 @@
#include "src/common/globals.h"
#include "src/handles/handles-inl.h"
-#include "src/heap/heap-inl.h" // For LooksValid implementation.
+#include "src/heap/heap-inl.h"
+#include "src/heap/memory-chunk.h"
#include "src/heap/read-only-heap.h"
#include "src/numbers/conversions.h"
#include "src/objects/map.h"
@@ -1113,13 +1114,8 @@ MaybeHandle<String> String::GetSubstitution(Isolate* isolate, Match* match,
isolate, capture,
match->GetNamedCapture(capture_name, &capture_state), String);
- switch (capture_state) {
- case CaptureState::INVALID:
- case CaptureState::UNMATCHED:
- break;
- case CaptureState::MATCHED:
- builder.AppendString(capture);
- break;
+ if (capture_state == CaptureState::MATCHED) {
+ builder.AppendString(capture);
}
continue_from_ix = closing_bracket_ix + 1;