Skip to content

Commit

Permalink
Fix recursive NewArrayBufferWithContents (#529)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe authored Dec 9, 2024
1 parent f68e385 commit e299b24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mozjs-sys/src/jsapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ JSObject* NewExternalArrayBuffer(JSContext* cx, size_t nbytes, void* contents,
JSObject* NewArrayBufferWithContents(JSContext* cx, size_t nbytes,
void* contents) {
js::UniquePtr<void, JS::FreePolicy> dataPtr{contents};
return NewArrayBufferWithContents(cx, nbytes, contents);
return JS::NewArrayBufferWithContents(cx, nbytes, std::move(dataPtr));
}

// Reexport some methods
Expand Down

0 comments on commit e299b24

Please sign in to comment.