Bug 708499 - Fix leak for out-param sized strings on mozilla-beta. r=bz, a=akeybl
authorBobby Holley <bobbyholley@gmail.com>
Fri, 09 Dec 2011 13:13:33 -0800
changeset 79034 4d4553e11c579f72398bcdcd58d6325b0e5779c3
parent 79033 2dc222dac518fd53ef6cbf2eab5b31c5b4c7e91c
child 79035 bccd17f22cc33526a14731b3b3ba0760ee4dcb79
push id422
push userbobbyholley@gmail.com
push dateFri, 09 Dec 2011 21:14:16 +0000
treeherdermozilla-beta@4d4553e11c57 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, akeybl
bugs708499
milestone9.0
Bug 708499 - Fix leak for out-param sized strings on mozilla-beta. r=bz, a=akeybl
js/src/xpconnect/src/xpcwrappednative.cpp
--- a/js/src/xpconnect/src/xpcwrappednative.cpp
+++ b/js/src/xpconnect/src/xpcwrappednative.cpp
@@ -2956,19 +2956,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