diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 19a0a25420b0..98e0d2d13457 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -413,9 +413,8 @@ TabChild::ParamsToArrays(nsIDialogParamBlock* aParams, aIntParams.AppendElement(val); } PRInt32 j = 0; - PRUnichar* str = nsnull; - while (NS_SUCCEEDED(aParams->GetString(j, &str))) { - nsAdoptingString strVal(str); + nsXPIDLString strVal; + while (NS_SUCCEEDED(aParams->GetString(j, getter_Copies(strVal)))) { aStringParams.AppendElement(strVal); ++j; }