Bug 1777413: Permit zero-length external ArrayBuffers. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D150701 also remove redundant assertion that a size_t >= 0.
This commit is contained in:
@@ -1711,8 +1711,8 @@ static bool CreateExternalArrayBuffer(JSContext* cx, unsigned argc, Value* vp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bytes <= 0) {
|
||||
JS_ReportErrorASCII(cx, "Size must be positive");
|
||||
if (bytes < 0) {
|
||||
JS_ReportErrorASCII(cx, "Size must be non-negative");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user