This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18578 - Checking if sourceBuffers is empty in removeSourceBuffer is redundant
Summary: Checking if sourceBuffers is empty in removeSourceBuffer is redundant
Status: VERIFIED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Aaron Colwell (c)
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 15:26 UTC by Philip Jägenstedt
Modified: 2012-10-02 08:03 UTC (History)
3 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-08-15 15:26:23 UTC
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-removesourcebuffer

2. If sourceBuffers is empty then throw an INVALID_STATE_ERR exception and abort these steps.
3. If sourceBuffer specifies an object that is not in sourceBuffers then throw a NOT_FOUND_ERR exception and abort these steps.

Removing step 2 completely would seem cleaner, unless special-casing the empty list helps API users or implementors in some way.
Comment 1 Aaron Colwell (c) 2012-10-01 22:31:32 UTC
Changes committed.
http://dvcs.w3.org/hg/html-media/rev/7bab66368f2c