Bug 613306 - fix bufferSubData quickStub - r=vladimir
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 25 Nov 2010 08:59:33 -0500
changeset 58217 8f18f55b6767206f73b8507e4195aa4e8a627e94
parent 58216 73caba953b11e7740a8d181c895fbbe244c0c112
child 58218 367ff816f171eb3c833e0d680dc273d92d64da83
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersvladimir
bugs613306
milestone2.0b8pre
Bug 613306 - fix bufferSubData quickStub - r=vladimir
content/canvas/src/CustomQS_WebGL.h
--- a/content/canvas/src/CustomQS_WebGL.h
+++ b/content/canvas/src/CustomQS_WebGL.h
@@ -172,17 +172,17 @@ nsIDOMWebGLRenderingContext_BufferSubDat
     js::TypedArray *wa = 0;
     js::ArrayBuffer *wb = 0;
 
     if (!JS_ValueToECMAInt32(cx, argv[0], &target))
         return JS_FALSE;
     if (!JS_ValueToECMAInt32(cx, argv[1], &offset))
         return JS_FALSE;
 
-    if (JSVAL_IS_PRIMITIVE(argv[2])) {
+    if (!JSVAL_IS_OBJECT(argv[2])) {
         xpc_qsThrowBadArg(cx, NS_ERROR_FAILURE, vp, 2);
         return JS_FALSE;
     }
 
     JSObject *arg3 = JSVAL_TO_OBJECT(argv[2]);
     if (js_IsArrayBuffer(arg3)) {
         wb = js::ArrayBuffer::fromJSObject(arg3);
     } else if (js_IsTypedArray(arg3)) {