diff --git a/mozjs-sys/src/jsapi.cpp b/mozjs-sys/src/jsapi.cpp index 04353bd094..1b7af0fe67 100644 --- a/mozjs-sys/src/jsapi.cpp +++ b/mozjs-sys/src/jsapi.cpp @@ -158,7 +158,7 @@ JSObject* NewExternalArrayBuffer(JSContext* cx, size_t nbytes, void* contents, JSObject* NewArrayBufferWithContents(JSContext* cx, size_t nbytes, void* contents) { js::UniquePtr dataPtr{contents}; - return NewArrayBufferWithContents(cx, nbytes, contents); + return JS::NewArrayBufferWithContents(cx, nbytes, std::move(dataPtr)); } // Reexport some methods