From 1d19649a19b4d233045d5a0815625f28bf42e057 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 7 Jul 2021 22:36:20 -0400 Subject: [PATCH] LibJS: Remove accidental dead code --- Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp index 38f700922f..dd9efb4b9a 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp @@ -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);