Backed out changeset a3e646ff4b21 (bug 1777413) for causing jsreftest failures on ArrayBuffer/bug1777413.js.

This commit is contained in:
Cosmin Sabou
2022-06-30 22:57:55 +03:00
parent 27d628ba02
commit d7066f82f3
3 changed files with 3 additions and 7 deletions

View File

@@ -1711,8 +1711,8 @@ static bool CreateExternalArrayBuffer(JSContext* cx, unsigned argc, Value* vp) {
return false;
}
if (bytes < 0) {
JS_ReportErrorASCII(cx, "Size must be non-negative");
if (bytes <= 0) {
JS_ReportErrorASCII(cx, "Size must be positive");
return false;
}