What happens if input ArrayBufferView changes during a WebCrypto operation ?

Our operations are asynchronous. We pass in ArrayBufferView objects. What is the expected behavior if the application changes the ArrayBufferView before the WebCrypto operation completes ?

If the expectation is that the operation completes normally on the input data as it was when the call was made, then the UA either needs to make a copy of the data when the call is first made or do some fancy lazy copy-on-write thing to ensure the web crypto operation retains access to the original data.

Alternatively, we may say that the behavior is undefined if you modify the ArrayBuffer that you pass in.

Are there other async web APIs that accept ArrayBufferView objects that have established a precedent for this ?


Received on Wednesday, 6 March 2013 19:34:11 UTC