Hello, When you create a promise capability, there's nothing preventing you from calling again @resolve and @reject on the capability to vend the promise twice. In the case of the Streams implementation to create capabilities are are already vended, we do it as { @promise: @Promise.@ resolve } or @reject and those capability objects don't have the @resolve and @reject slots so calling them would obviously fail.
Vending a promise twice means probably an issue in the algorithm that you are implementing and if it were properly designed that shouldn't happen. Software and specs can have bugs though and we could end up hitting those unexpected cases. For that I think we could change the internal promise capabilities to use the newly added @assert when they are vended twice and also add two functions to create those vended capabilities in a single call. Any comments? -- Xabier Rodríguez Calvar Software Engineer IGALIA http://www.igalia.com
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev