|
@@ -72,7 +72,7 @@ namespace Jint.Native.Array
|
|
|
|
|
|
public abstract void CreateDataPropertyOrThrow(ulong index, JsValue value);
|
|
public abstract void CreateDataPropertyOrThrow(ulong index, JsValue value);
|
|
|
|
|
|
- public abstract void Set(ulong index, JsValue value, bool throwOnError);
|
|
|
|
|
|
+ public abstract void Set(ulong index, JsValue value, bool updateLength = false, bool throwOnError = true);
|
|
|
|
|
|
public abstract void DeletePropertyOrThrow(ulong index);
|
|
public abstract void DeletePropertyOrThrow(ulong index);
|
|
|
|
|
|
@@ -226,7 +226,7 @@ namespace Jint.Native.Array
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
=> _target.CreateDataPropertyOrThrow(JsString.Create(index), value);
|
|
=> _target.CreateDataPropertyOrThrow(JsString.Create(index), value);
|
|
|
|
|
|
- public override void Set(ulong index, JsValue value, bool throwOnError)
|
|
|
|
|
|
+ public override void Set(ulong index, JsValue value, bool updateLength = false, bool throwOnError = true)
|
|
=> _target.Set(JsString.Create(index), value, throwOnError);
|
|
=> _target.Set(JsString.Create(index), value, throwOnError);
|
|
|
|
|
|
public override void DeletePropertyOrThrow(ulong index)
|
|
public override void DeletePropertyOrThrow(ulong index)
|
|
@@ -297,8 +297,8 @@ namespace Jint.Native.Array
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
=> _target.SetIndexValue((uint) index, value, updateLength: false);
|
|
=> _target.SetIndexValue((uint) index, value, updateLength: false);
|
|
|
|
|
|
- public override void Set(ulong index, JsValue value, bool throwOnError)
|
|
|
|
- => _target.Set((uint) index, value, throwOnError);
|
|
|
|
|
|
+ public override void Set(ulong index, JsValue value, bool updateLength = false, bool throwOnError = true)
|
|
|
|
+ => _target.SetIndexValue((uint) index, value, updateLength);
|
|
}
|
|
}
|
|
|
|
|
|
private sealed class TypedArrayInstanceOperations : ArrayOperations
|
|
private sealed class TypedArrayInstanceOperations : ArrayOperations
|
|
@@ -357,7 +357,7 @@ namespace Jint.Native.Array
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
public override void CreateDataPropertyOrThrow(ulong index, JsValue value)
|
|
=> _target.CreateDataPropertyOrThrow(index, value);
|
|
=> _target.CreateDataPropertyOrThrow(index, value);
|
|
|
|
|
|
- public override void Set(ulong index, JsValue value, bool throwOnError)
|
|
|
|
|
|
+ public override void Set(ulong index, JsValue value, bool updateLength = false, bool throwOnError = true)
|
|
=> _target[(int) index] = value;
|
|
=> _target[(int) index] = value;
|
|
|
|
|
|
public override void DeletePropertyOrThrow(ulong index)
|
|
public override void DeletePropertyOrThrow(ulong index)
|
|
@@ -381,4 +381,4 @@ namespace Jint.Native.Array
|
|
|
|
|
|
public override ObjectInstance Target => _target;
|
|
public override ObjectInstance Target => _target;
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|