Open wolenetz opened 3 years ago
Speculative wpt change, from Chromium/Blink, to help understand Mozilla & Safari behavior around this scenario is https://chromium-review.googlesource.com/c/chromium/src/+/3083226
Fortunately, the strengthened wpt test for this behavior appears [1] to indicate that recent Chrome, Firefox, Edge, Safari all abort the appendBuffer steps if prepare append aborted with QuotaExceededError, making this fix more editorial (though there could still be other implementations that strictly interpreted the REC spec text and would thus fail the strengthened wpt test).
Currently, the last step in the "Prepare Append" algorithm is (bold for emphasis in this copy of it):
However, the caller (SourceBuffer's appendBuffer() method) does not acknowledge that the Prepare Append algorithm might have thrown and aborted.
If the Prepare Append algorithm had aborted, the remainder of the steps in appendBuffer() should *not be run. e.g., |data| should not be appended to the input buffer, updating shouldn't become true, updatestart event shouldn't be enqueued, and no asynchronous run of the buffer append algorithm should happen.
I believe this is likely editorial, but will see if I can find behavior to the contrary in either Mozilla or Safari MSE implementations (assuming I can get them to decide that an append is too much and give QuotaExceededError).
If truly editorial, the next step after "Run the prepare append algorithm" in appendBuffer() needs to abort if the prepare append algorithm aborted.