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 81595 c1bc4c0988143a2d8933b43018fb6ce7747c4871
parent 81594 d7e55d8251a62eb606c64cae0dfe07eef0320cec
child 81596 2c2730b0cbf7750957e63041fb7b5de3a290c3f6
push id628
push userclegnitto@mozilla.com
push dateWed, 21 Dec 2011 14:41:57 +0000
treeherdermozilla-aurora@24a61ad789e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs692342
milestone11.0a1
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();