| Index: src/jsregexp.cc
|
| diff --git a/src/jsregexp.cc b/src/jsregexp.cc
|
| index cbd0b26a2acc6b30003cbe5183a4bc68609bd858..cc067955873cc63f79fca26c416a2f8dea9deac4 100644
|
| --- a/src/jsregexp.cc
|
| +++ b/src/jsregexp.cc
|
| @@ -5901,7 +5901,12 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(
|
| macro_assembler.SetCurrentPositionFromEnd(max_length);
|
| }
|
|
|
| - macro_assembler.set_global(is_global);
|
| + if (is_global) {
|
| + macro_assembler.set_global_flag(
|
| + (data->tree->min_match() > 0)
|
| + ? RegExpMacroAssembler::GLOBAL_NO_ZERO_LENGTH_MATCH
|
| + : RegExpMacroAssembler::GLOBAL);
|
| + }
|
|
|
| return compiler.Assemble(¯o_assembler,
|
| node,
|
|
|