Bug 1007458. Actually check for errors when converting a Value to a variant in showModalDialog. r=smaug

This commit is contained in:
Boris Zbarsky 2014-05-08 22:20:54 -04:00
parent b90fcf3db6
commit 4ff4b2a3b2

View File

@ -8978,6 +8978,9 @@ nsGlobalWindow::ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
aError = nsContentUtils::XPConnect()->JSToVariant(aCx, aError = nsContentUtils::XPConnect()->JSToVariant(aCx,
aArgument, aArgument,
getter_AddRefs(args)); getter_AddRefs(args));
if (aError.Failed()) {
return JS::UndefinedValue();
}
nsCOMPtr<nsIVariant> retVal = ShowModalDialog(aUrl, args, aOptions, aError); nsCOMPtr<nsIVariant> retVal = ShowModalDialog(aUrl, args, aOptions, aError);
if (aError.Failed()) { if (aError.Failed()) {