[Streams API] Shield streams against user replacing the Promise constructor
[WebKit-https.git] / Source / WebCore / Modules / streams / WritableStreamInternals.js
index 5b88d75572ace3a7e02f97fa4715d94cf554af46..3cdf92b6796161725cdf4d50c4a74439ae16ad47 100644 (file)
@@ -47,7 +47,7 @@ function syncWritableStreamStateWithQueue(stream)
     const shouldApplyBackpressure = stream.@queue.size > stream.@strategy.highWaterMark;
     if (shouldApplyBackpressure && stream.@state === @streamWritable) {
         stream.@state = @streamWaiting;
-        stream.@readyPromiseCapability = @newPromiseCapability(Promise);
+        stream.@readyPromiseCapability = @newPromiseCapability(@Promise);
     }
     if (!shouldApplyBackpressure && stream.@state === @streamWaiting) {
         stream.@state = @streamWritable;