| 71 | } |
| 72 | |
| 73 | void ArrayBuffer::reset(const uint8_t *data, uint32_t length) { |
| 74 | if (_jsArrayBuffer != nullptr) { |
| 75 | _jsArrayBuffer->unroot(); |
| 76 | _jsArrayBuffer->decRef(); |
| 77 | } |
| 78 | _jsArrayBuffer = se::Object::createArrayBufferObject(data, length); |
| 79 | _jsArrayBuffer->getArrayBufferData(static_cast<uint8_t **>(&_data), nullptr); |
| 80 | _byteLength = length; |
| 81 | } |
| 82 | |
| 83 | } // namespace cc |
nothing calls this directly
no test coverage detected