Modified: trunk/JSTests/test262.yaml (218448 => 218449)
--- trunk/JSTests/test262.yaml 2017-06-17 07:54:42 UTC (rev 218448)
+++ trunk/JSTests/test262.yaml 2017-06-17 10:52:34 UTC (rev 218449)
@@ -6526,17 +6526,17 @@
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js
@@ -6582,9 +6582,9 @@
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js
cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js
@@ -6610,13 +6610,13 @@
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js
@@ -7416,9 +7416,9 @@
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js
@@ -7472,9 +7472,9 @@
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js
cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js
@@ -7496,9 +7496,9 @@
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js
@@ -8884,9 +8884,9 @@
- path: test262/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js
cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js
@@ -8960,9 +8960,9 @@
- path: test262/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js
@@ -11060,9 +11060,9 @@
- path: test262/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js
@@ -11136,9 +11136,9 @@
- path: test262/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js
@@ -11340,9 +11340,9 @@
- path: test262/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js
cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js
@@ -12566,9 +12566,9 @@
- path: test262/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js
cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js
@@ -12794,9 +12794,9 @@
- path: test262/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js
- cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+ cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
- path: test262/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js
cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
- path: test262/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js
Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (218448 => 218449)
--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2017-06-17 07:54:42 UTC (rev 218448)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2017-06-17 10:52:34 UTC (rev 218449)
@@ -448,8 +448,7 @@
JSObject* thisObject = thisValue.toObject(exec);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
-
- unsigned length = getLength(exec, thisObject);
+ unsigned length = toLength(exec, thisObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
StringRecursionChecker checker(exec, thisObject);
@@ -736,7 +735,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
if (length == 0) {
@@ -775,7 +774,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
for (unsigned n = 0; n < exec->argumentCount(); n++) {
@@ -806,7 +805,7 @@
if (UNLIKELY(!thisObject))
return encodedJSValue();
- unsigned length = getLength(exec, thisObject);
+ unsigned length = toLength(exec, thisObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
switch (thisObject->indexingType()) {
@@ -897,7 +896,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
if (length == 0) {
@@ -924,7 +923,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return { };
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, { });
unsigned begin = argumentClampedIndexFromStartOrEnd(exec, 0, length);
@@ -940,7 +939,7 @@
if (UNLIKELY(speciesResult.first == SpeciesConstructResult::Exception))
return { };
- bool okToDoFastPath = speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == getLength(exec, thisObj);
+ bool okToDoFastPath = speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, { });
if (LIKELY(okToDoFastPath)) {
if (JSArray* result = asArray(thisObj)->fastSlice(*exec, begin, end - begin))
@@ -980,7 +979,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
if (!exec->argumentCount()) {
@@ -1025,7 +1024,7 @@
return JSValue::encode(jsUndefined());
JSObject* result = nullptr;
- bool okToDoFastPath = speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == getLength(exec, thisObj);
+ bool okToDoFastPath = speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
if (LIKELY(okToDoFastPath))
result = asArray(thisObj)->fastSlice(*exec, actualStart, actualDeleteCount);
@@ -1078,11 +1077,14 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ double doubleLength = toLength(exec, thisObj);
+ unsigned length = doubleLength;
RETURN_IF_EXCEPTION(scope, encodedJSValue());
unsigned nrArgs = exec->argumentCount();
if (nrArgs) {
+ if (UNLIKELY(doubleLength + static_cast<double>(nrArgs) > maxSafeInteger()))
+ return throwVMTypeError(exec, scope, ASCIILiteral("Cannot shift to offset greater than (2 ** 53) - 1"));
unshift<JSArray::ShiftCountForShift>(exec, thisObj, 0, 0, nrArgs, length);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
}
@@ -1106,7 +1108,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
unsigned index = argumentClampedIndexFromStartOrEnd(exec, 1, length);
@@ -1134,7 +1136,7 @@
ASSERT(!!scope.exception() == !thisObj);
if (UNLIKELY(!thisObj))
return encodedJSValue();
- unsigned length = getLength(exec, thisObj);
+ unsigned length = toLength(exec, thisObj);
if (UNLIKELY(scope.exception()) || !length)
return JSValue::encode(jsNumber(-1));