Bug 708499 - Fix leak for out-param sized strings on aurora. r=bz, a=akeybl
authorBobby Holley <bobbyholley@gmail.com>
Wed, 14 Dec 2011 10:57:27 -0800
changeset 80771 78de0ed3483f0cdd5b22392183942fca6ab6a312
parent 80770 ae9e4e878c58694c1cc6c780a4b3c3634fc8a9aa
child 80772 3e1324e78c8a9b50960878618812857f6d1e56bb
push id604
push userbobbyholley@gmail.com
push dateWed, 14 Dec 2011 18:58:09 +0000
treeherdermozilla-aurora@78de0ed3483f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, akeybl
bugs708499
milestone10.0a2
Bug 708499 - Fix leak for out-param sized strings on aurora. r=bz, a=akeybl
js/xpconnect/src/XPCWrappedNative.cpp
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -2708,19 +2708,17 @@ CallMethodHelper::ConvertDependentParams
         }
 
         jsval src;
 
         if (!GetOutParamSource(i, &src))
             return JS_FALSE;
 
         if (paramInfo.IsOut()) {
-            if (datum_type.IsPointer() &&
-                !datum_type.IsInterfacePointer() &&
-                isArray) {
+            if (!isArray || datum_type.IsPointer()) {
                 dp->SetValNeedsCleanup();
             }
 
             if (!paramInfo.IsIn())
                 continue;
         } else {
             NS_ASSERTION(i < mArgc || paramInfo.IsOptional(),
                          "Expected either enough arguments or an optional argument");