Overview.htm
changeset 110 6a7a40bde1e5
parent 109 44cada6acb2f
child 111 f3c425cc88db
equal deleted inserted replaced
109:44cada6acb2f 110:6a7a40bde1e5
   441 					</p>
   441 					</p>
   442 
   442 
   443 					<p>
   443 					<p>
   444 						This method must run the steps below:
   444 						This method must run the steps below:
   445 						<ol>
   445 						<ol>
   446 							<li><a>Abort wait</a></li>
   446 							<li><a>Abort waiting</a></li>
   447 
   447 
   448 							<li>Set <a>waitPromise</a> to a new <a>Promise</a></li>
   448 							<li>Set <a>waitPromise</a> to a new <a>Promise</a></li>
   449 							<li>Return <a>waitPromise</a>, and then continue to process the steps in this algorithm</li>
   449 							<li>Return <a>waitPromise</a>, and then continue to process the steps in this algorithm</li>
   450 							<li>Wait until <a>pendingWriteQueue</a> is empty and <a>spaceAvailable</a> is not 0</li>
   450 							<li>Wait until <a>pendingWriteQueue</a> is empty and <a>spaceAvailable</a> is not 0</li>
   451 							<li>
   451 							<li>
   530 				A WritableByteStream has an associated <a>Promise</a> <dfn>waitPromise</dfn> which is used by the <code>awaitSpaceAvailable()</code> method.
   530 				A WritableByteStream has an associated <a>Promise</a> <dfn>waitPromise</dfn> which is used by the <code>awaitSpaceAvailable()</code> method.
   531 				This variable is initialized to <code>null</code> on construction.
   531 				This variable is initialized to <code>null</code> on construction.
   532 			</p>
   532 			</p>
   533 
   533 
   534 			<p>
   534 			<p>
   535 				To <dfn>abort wait</dfn>, run the steps below:
   535 				To <dfn>abort waiting</dfn>, run the steps below:
   536 				<ol>
   536 				<ol>
   537 					<li>If <a>waitPromise</a> is <code>null</code>, terminate these steps</li>
   537 					<li>If <a>waitPromise</a> is <code>null</code>, terminate these steps</li>
   538 					<li>Let <var>detachedWaitPromise</var> be <a>waitPromise</a></li>
   538 					<li>Let <var>detachedWaitPromise</var> be <a>waitPromise</a></li>
   539 					<li>Set <a>waitPromise</a> to <code>null</code></li>
   539 					<li>Set <a>waitPromise</a> to <code>null</code></li>
   540 					<li>Reject <var>detachedWaitPromise</var> with an "<code><a>AbortError</a></code>"</li>
   540 					<li>Reject <var>detachedWaitPromise</var> with an "<code><a>AbortError</a></code>"</li>
   848 
   848 
   849 						<ol>
   849 						<ol>
   850 							<li>If <a>readPending</a> is set, throw an "<code><a>InvalidStateError</a></code>"</li>
   850 							<li>If <a>readPending</a> is set, throw an "<code><a>InvalidStateError</a></code>"</li>
   851 							<li>Set <a>readPending</a></li>
   851 							<li>Set <a>readPending</a></li>
   852 
   852 
   853 							<li><a>Abort wait</a> <var>destination</var></a>
   853 							<li>Run <a>abort waiting</a> algorithm on <var>destination</var></a>
   854 
   854 
   855 							<li>Set <a>amountBeingReturned</a> to 0</li>
   855 							<li>Set <a>amountBeingReturned</a> to 0</li>
   856 
   856 
   857 							<li><a>Retrieve data</a></li>
   857 							<li><a>Retrieve data</a></li>
   858 
   858