Bug 413074 Bad param "value" to nsXPConnect::JSToVariant() r=mrbkap sr=jst a=mtschrep

This commit is contained in:
timeless@mozdev.org 2008-02-04 11:29:36 -08:00
parent f183ea3509
commit d41cf6beb6

View File

@ -1962,7 +1962,10 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
// we would need to root rval.
JSAutoRequest ar(mContext);
if (NS_SUCCEEDED(rv)) {
rv = nsContentUtils::XPConnect()->JSToVariant(mContext, rval, arv);
if (rval == JSVAL_NULL)
*arv = nsnull;
else
rv = nsContentUtils::XPConnect()->JSToVariant(mContext, rval, arv);
}
// ScriptEvaluated needs to come after we pop the stack