Bug 1774672 - Remove no longer neaded JS Streams Magic Values r=iain

Differential Revision: https://phabricator.services.mozilla.com/D149562
This commit is contained in:
Matthew Gaudet 2022-06-17 16:07:09 +00:00
Родитель a139eedb97
Коммит d1c4d10de4
2 изменённых файлов: 0 добавлений и 20 удалений

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

@ -265,24 +265,6 @@ enum JSWhyMagic {
/** for local use */
JS_GENERIC_MAGIC,
/**
* Write records queued up in WritableStreamDefaultController.[[queue]] in the
* spec are either "close" (a String) or Record { [[chunk]]: chunk }, where
* chunk is an arbitrary user-provided (and therefore non-magic) value.
* Represent "close" the String as this magic value; represent Record records
* as the |chunk| value within each of them.
*/
JS_WRITABLESTREAM_CLOSE_RECORD,
/**
* The ReadableStream pipe-to operation concludes with a "finalize" operation
* that accepts an optional |error| argument. In certain cases that optional
* |error| must be stored in a handler function, for use after a promise has
* settled. We represent the argument not being provided, in those cases,
* using this magic value.
*/
JS_READABLESTREAM_PIPETO_FINALIZE_WITHOUT_ERROR,
/**
* When an error object is created without the error cause argument, we set
* the error's cause slot to this magic value.

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

@ -1354,8 +1354,6 @@ class NativeObject : public JSObject {
inline void ensureDenseInitializedLength(uint32_t index, uint32_t extra);
void setDenseElement(uint32_t index, const Value& val) {
// Note: Streams code can call this for the internal ListObject type with
// MagicValue(JS_WRITABLESTREAM_CLOSE_RECORD).
MOZ_ASSERT_IF(val.isMagic(), val.whyMagic() != JS_ELEMENTS_HOLE);
setDenseElementUnchecked(index, val);
}