| Index: src/harmony-atomics.js
|
| diff --git a/src/harmony-atomics.js b/src/harmony-atomics.js
|
| index aa81822d1e2f877f4de933f02d269b81775eea11..4ddf3b04f74273f43ce062c16c90728c7b77489d 100644
|
| --- a/src/harmony-atomics.js
|
| +++ b/src/harmony-atomics.js
|
| @@ -33,7 +33,7 @@ function CheckSharedIntegerTypedArray(ia) {
|
| function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
|
| CheckSharedTypedArray(sta);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= sta.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsCompareExchange(sta, index, oldValue, newValue);
|
| @@ -42,7 +42,7 @@ function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
|
| function AtomicsLoadJS(sta, index) {
|
| CheckSharedTypedArray(sta);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= sta.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsLoad(sta, index);
|
| @@ -51,7 +51,7 @@ function AtomicsLoadJS(sta, index) {
|
| function AtomicsStoreJS(sta, index, value) {
|
| CheckSharedTypedArray(sta);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= sta.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsStore(sta, index, value);
|
| @@ -60,7 +60,7 @@ function AtomicsStoreJS(sta, index, value) {
|
| function AtomicsAddJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsAdd(ia, index, value);
|
| @@ -69,7 +69,7 @@ function AtomicsAddJS(ia, index, value) {
|
| function AtomicsSubJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsSub(ia, index, value);
|
| @@ -78,7 +78,7 @@ function AtomicsSubJS(ia, index, value) {
|
| function AtomicsAndJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsAnd(ia, index, value);
|
| @@ -87,7 +87,7 @@ function AtomicsAndJS(ia, index, value) {
|
| function AtomicsOrJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsOr(ia, index, value);
|
| @@ -96,7 +96,7 @@ function AtomicsOrJS(ia, index, value) {
|
| function AtomicsXorJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsXor(ia, index, value);
|
| @@ -105,7 +105,7 @@ function AtomicsXorJS(ia, index, value) {
|
| function AtomicsExchangeJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| index = $toInteger(index);
|
| - if (index < 0 || index >= ia.length) {
|
| + if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| return %_AtomicsExchange(ia, index, value);
|
|
|