Bug 692342 - Assert against arrays of jsvals, since we don't handle them. r=mrbkap
authorBobby Holley <bobbyholley@gmail.com>
Fri, 25 Nov 2011 17:09:07 -0800
changeset 80796 c1bc4c0988143a2d8933b43018fb6ce7747c4871
parent 80795 d7e55d8251a62eb606c64cae0dfe07eef0320cec
child 80797 2c2730b0cbf7750957e63041fb7b5de3a290c3f6
push id21530
push userbmo@edmorley.co.uk
push dateSat, 26 Nov 2011 08:27:28 +0000
treeherdermozilla-central@c58bad0b4640 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs692342
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 692342 - Assert against arrays of jsvals, since we don't handle them. r=mrbkap
js/xpconnect/src/XPCWrappedNative.cpp
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -2733,16 +2733,19 @@ CallMethodHelper::ConvertDependentParam(
     dp->type = type;
 
     if (isArray) {
         if (NS_FAILED(mIFaceInfo->GetTypeForParam(mVTableIndex, &paramInfo, 1,
                                                   &datum_type))) {
             Throw(NS_ERROR_XPC_CANT_GET_ARRAY_INFO, mCallContext);
             return JS_FALSE;
         }
+        NS_ABORT_IF_FALSE(datum_type.TagPart() != nsXPTType::T_JSVAL,
+                          "Arrays of JSVals not currently supported - "
+                          "see bug 693337.");
     } else {
         datum_type = type;
     }
 
     // Specify the correct storage/calling semantics.
     if (paramInfo.IsIndirect())
         dp->SetIndirect();