Skip to content

Commit

Permalink
Bug 1774672 - Remove no longer neaded JS Streams Magic Values r=iain
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaudet committed Jun 17, 2022
1 parent a139eed commit d1c4d10
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
18 changes: 0 additions & 18 deletions js/public/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions js/src/vm/NativeObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d1c4d10

Please sign in to comment.