<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Typed Arrays have no public facing API"
   href="https://bugs.webkit.org/show_bug.cgi?id=120112#c33">Comment # 33</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Typed Arrays have no public facing API"
   href="https://bugs.webkit.org/show_bug.cgi?id=120112">bug 120112</a>
              from <span class="vcard"><a class="email" href="mailto:ggaren&#64;apple.com" title="Geoffrey Garen &lt;ggaren&#64;apple.com&gt;"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
        <pre><span class="quote">&gt; &gt; While this follows the JSC naming scheme, it also makes the API a bit more
&gt; &gt; cumbersome to use: now, every time you want to get the data pointer or type
&gt; &gt; of a typed array, you first have to check if the JSValueRef you got in your
&gt; &gt; function call is a JSObjectRef (using JSValueIsObject()). Allowing for
&gt; &gt; JSValues to be passed into these functions (i.e.
&gt; &gt; &quot;JSValueGetTypedArrayDataPtr&quot;) would be much more convenient, but also not
&gt; &gt; reflect the truth that a Typed Array is a JSObject, not a JSValue.
&gt; 
&gt; Yeah.  Personally, I would not object to JSValueGetTypedArrayType in
&gt; addition to JSObjectGetTypedArrayType, particularly since
&gt; JSValueGetTypedArrayType has a very obvious spec and could even be
&gt; implemented in terms of the other APIs.</span >

The fact that JSObject is separate from JSValue, requiring a type check and cast before use, is a mistake, which is fixed in the modern Objective-C API. But I think it's good to adhere to the mistake in the C API so that the API remains internally consistent. 

It's easy for clients to fix the mistake by writing their own 2 line JSValue wrappers for JSObject functions, and indeed that's what we do in WebKit.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>