1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00

LibJS: Remove accidental dead code

This commit is contained in:
Timothy Flynn 2021-07-07 22:36:20 -04:00 committed by Linus Groh
parent eedee151ab
commit 1d19649a19

View file

@ -107,10 +107,6 @@ static Value regexp_builtin_exec(GlobalObject& global_object, RegExpObject& rege
// FIXME: This should try using internal slots [[RegExpMatcher]], [[OriginalFlags]], etc.
auto& vm = global_object.vm();
auto str = vm.argument(0).to_string(global_object);
if (vm.exception())
return {};
// RegExps without "global" and "sticky" always start at offset 0.
if (!regexp_object.regex().options().has_flag_set((ECMAScriptFlags)regex::AllFlags::Internal_Stateful)) {
regexp_object.set(vm.names.lastIndex, Value(0), true);