summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/Value.cpp')
-rw-r--r--Libraries/LibJS/Runtime/Value.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Libraries/LibJS/Runtime/Value.cpp b/Libraries/LibJS/Runtime/Value.cpp
index dc45ea589b..80917df5d5 100644
--- a/Libraries/LibJS/Runtime/Value.cpp
+++ b/Libraries/LibJS/Runtime/Value.cpp
@@ -43,9 +43,6 @@
#include <LibJS/Runtime/Value.h>
#include <math.h>
-// 2 ** 53 - 1
-#define MAX_ARRAY_LIKE_INDEX 9007199254740991.0
-
namespace JS {
bool Value::is_array() const
@@ -261,7 +258,7 @@ i32 Value::as_i32() const
size_t Value::as_size_t() const
{
ASSERT(as_double() >= 0);
- return min((double)(i32)as_double(), MAX_ARRAY_LIKE_INDEX);
+ return min((double)as_i32(), MAX_ARRAY_LIKE_INDEX);
}
double Value::to_double(Interpreter& interpreter) const