W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Bug 20510] New: send(sequence<short> data) should just be send(any data)

From: <bugzilla@jessica.w3.org>
Date: Mon, 24 Dec 2012 08:23:52 +0000
To: public-audio@w3.org
Message-ID: <bug-20510-5429@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20510

            Bug ID: 20510
           Summary: send(sequence<short> data) should just be send(any
                    data)
    Classification: Unclassified
           Product: AudioWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: MIDI API
          Assignee: dave.null@w3.org
          Reporter: w3c@marcosc.com
        QA Contact: public-audio@w3.org

If the first argument of send() is going to be coerced in to a Uint8Array, then
send should just take any as a type. That avoids a whole bunch of unnecessary
checks that will be performed when whatever value if thrown into new
Uint8Array().

For example:

send({}) === []
send(function(){}) === []
send(Node) === []

send("") === [0]
send([" "]) === []

send([undefined,null,Node,Array, [1,23,432]]) === [0, 0, 0, 0, 0]

This one is important:
send(["100", "200", "300"]) === [100, 200, 44]


And so on…

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 24 December 2012 08:23:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:04 UTC