Skip to content

Commit e299b24

Browse files
authored
Fix recursive NewArrayBufferWithContents (#529)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
1 parent f68e385 commit e299b24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mozjs-sys/src/jsapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ JSObject* NewExternalArrayBuffer(JSContext* cx, size_t nbytes, void* contents,
158158
JSObject* NewArrayBufferWithContents(JSContext* cx, size_t nbytes,
159159
void* contents) {
160160
js::UniquePtr<void, JS::FreePolicy> dataPtr{contents};
161-
return NewArrayBufferWithContents(cx, nbytes, contents);
161+
return JS::NewArrayBufferWithContents(cx, nbytes, std::move(dataPtr));
162162
}
163163

164164
// Reexport some methods

0 commit comments

Comments
 (0)