Bug 504482 nsXBLProtoImplMethod::CompileMember shouldn't poke args[] outside paramCount condition

r=bz
This commit is contained in:
timeless@mozdev.org 2009-08-12 11:49:52 +02:00
parent bc35a8740a
commit 5d929545cf

View File

@ -204,15 +204,15 @@ nsXBLProtoImplMethod::CompileMember(nsIScriptContext* aContext, const nsCString&
args = new char*[paramCount];
if (!args)
return NS_ERROR_OUT_OF_MEMORY;
}
// Add our parameters to our args array.
PRInt32 argPos = 0;
for (nsXBLParameter* curr = uncompiledMethod->mParameters;
curr;
curr = curr->mNext) {
args[argPos] = curr->mName;
argPos++;
// Add our parameters to our args array.
PRInt32 argPos = 0;
for (nsXBLParameter* curr = uncompiledMethod->mParameters;
curr;
curr = curr->mNext) {
args[argPos] = curr->mName;
argPos++;
}
}
// Get the body