| 27 | namespace cc { |
| 28 | |
| 29 | ArrayBuffer::ArrayBuffer(uint32_t length) : _byteLength{length} { |
| 30 | _jsArrayBuffer = se::Object::createArrayBufferObject(nullptr, length); |
| 31 | _jsArrayBuffer->root(); |
| 32 | _jsArrayBuffer->getArrayBufferData(static_cast<uint8_t **>(&_data), nullptr); |
| 33 | memset(_data, 0x00, _byteLength); |
| 34 | } |
| 35 | |
| 36 | ArrayBuffer::ArrayBuffer(const uint8_t *data, uint32_t length) { |
| 37 | reset(data, length); |
nothing calls this directly
no test coverage detected