Bug 1496099 - Fix upside-down error message when canceling a locked stream. r=baku

Differential Revision: https://phabricator.services.mozilla.com/D7633

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Orendorff 2018-10-06 12:27:10 +00:00
Родитель 9aeb8183fd
Коммит e49114c01f
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -840,7 +840,7 @@ ReadableStream_cancel(JSContext* cx, unsigned argc, Value* vp)
// rejected with a TypeError exception.
if (stream->locked()) {
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
JSMSG_READABLESTREAM_NOT_LOCKED, "cancel");
JSMSG_READABLESTREAM_LOCKED_METHOD, "cancel");
return ReturnPromiseRejectedWithPendingError(cx, args);
}

Просмотреть файл

@ -640,7 +640,7 @@ MSG_DEF(JSMSG_NUMBER_MUST_BE_FINITE_NON_NEGATIVE, 1, JSEXN_RANGEERR, "'{0}' must
MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_BYTESWRITTEN, 0, JSEXN_RANGEERR, "'bytesWritten' exceeds remaining length.")
MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_SIZE, 0, JSEXN_RANGEERR, "view size does not match requested data.")
MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_OFFSET, 0, JSEXN_RANGEERR, "view offset does not match requested position.")
MSG_DEF(JSMSG_READABLESTREAM_NOT_LOCKED, 1, JSEXN_TYPEERR, "'{0}' may only be called on a locked stream.")
MSG_DEF(JSMSG_READABLESTREAM_LOCKED_METHOD, 1, JSEXN_TYPEERR, "'{0}' can't be called on a locked stream.")
MSG_DEF(JSMSG_READABLESTREAM_LOCKED, 0, JSEXN_TYPEERR, "A Reader may only be created for an unlocked ReadableStream.")
MSG_DEF(JSMSG_READABLESTREAM_NOT_BYTE_STREAM_CONTROLLER, 1, JSEXN_TYPEERR, "{0} requires a ReadableByteStreamController.")
MSG_DEF(JSMSG_READABLESTREAM_NOT_DEFAULT_CONTROLLER, 1, JSEXN_TYPEERR, "{0} requires a ReadableStreamDefaultController.")