| 896 | } |
| 897 | |
| 898 | txBoolean fxIsDataViewOutOfBound(txMachine* the, txSlot* view, txSlot* buffer) |
| 899 | { |
| 900 | txInteger size = view->value.dataView.size; |
| 901 | txSlot* arrayBuffer = buffer->value.reference->next; |
| 902 | txSlot* bufferInfo = arrayBuffer->next; |
| 903 | if (arrayBuffer->value.arrayBuffer.address == C_NULL) |
| 904 | return 1; |
| 905 | if (bufferInfo->value.bufferInfo.maxLength >= 0) { |
| 906 | txInteger offset = view->value.dataView.offset; |
| 907 | txInteger byteLength = bufferInfo->value.bufferInfo.length; |
| 908 | if (offset > byteLength) |
| 909 | return 1; |
| 910 | if ((size > 0) && (offset + size > byteLength)) |
| 911 | return 1; |
| 912 | } |
| 913 | return 0; |
| 914 | } |
| 915 | |
| 916 | txSlot* fxNewDataViewInstance(txMachine* the) |
| 917 | { |
no outgoing calls
no test coverage detected