Add stream constructor polyfills

This commit is contained in:
Basilisk-Dev 2026-05-08 15:01:44 -04:00 committed by wuggy
commit d132fe4728
3 changed files with 1508 additions and 13 deletions

File diff suppressed because it is too large Load diff

View file

@ -165,6 +165,8 @@ class CountQueuingStrategy : public NativeObject
static const Class protoClass_;
};
[[nodiscard]] bool InitStreamExtras(JSContext* cx, HandleObject global);
} // namespace js
#endif /* builtin_Stream_h */

View file

@ -464,6 +464,10 @@ GlobalObject::initStandardClasses(JSContext* cx, Handle<GlobalObject*> global)
if (!ensureConstructor(cx, global, static_cast<JSProtoKey>(k)))
return false;
}
if (cx->options().streams() && !InitStreamExtras(cx, global))
return false;
return true;
}