diff options
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ErrorTypes.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp index 435908b7cf..3eb7c3a5a4 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp @@ -1946,7 +1946,7 @@ static size_t flatten_into_array(GlobalObject& global_object, Object& new_array, if (depth > 0 && value.is_array(global_object)) { if (vm.did_reach_stack_space_limit()) { - vm.throw_exception<Error>(global_object, "Call stack size limit exceeded"); + vm.throw_exception<Error>(global_object, ErrorType::CallStackSizeExceeded); return {}; } diff --git a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h index 54041eff20..1ed7e8da73 100644 --- a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h +++ b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h @@ -15,6 +15,7 @@ M(BigIntFromNonIntegral, "Cannot convert non-integral number to BigInt") \ M(BigIntInvalidValue, "Invalid value for BigInt: {}") \ M(BindingNotInitialized, "Binding {} is not initialized") \ + M(CallStackSizeExceeded, "Call stack size limit exceeded") \ M(ClassConstructorWithoutNew, "Class constructor {} must be called with 'new'") \ M(ClassExtendsValueNotAConstructorOrNull, "Class extends value {} is not a constructor or null") \ M(ClassExtendsValueInvalidPrototype, "Class extends value has an invalid prototype {}") \ diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 4b25bb3e3b..579f5dbdc3 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -116,7 +116,7 @@ public: VERIFY(!exception()); // Ensure we got some stack space left, so the next function call doesn't kill us. if (did_reach_stack_space_limit()) - throw_exception<Error>(global_object, "Call stack size limit exceeded"); + throw_exception<Error>(global_object, ErrorType::CallStackSizeExceeded); else m_execution_context_stack.append(&context); } |