From 7fe85266fd3d44b24ed37be5ffe9ca4c0b66c59f Mon Sep 17 00:00:00 2001 From: "caillon%returnzero.com" Date: Tue, 29 Jul 2003 19:03:00 +0000 Subject: [PATCH] Adding comments, per bzbarsky. bug 214050. git-svn-id: svn://10.0.0.236/trunk@145342 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/caps/src/nsScriptSecurityManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index cabe852076e..127f1a6b90e 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -778,6 +778,9 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction, }; nsXPIDLString errorMsg; + // We need to keep our existing failure rv and not override it + // with a likely success code from the following string bundle + // call in order to throw the correct security exception later. nsresult rv2 = sStrBundle->FormatStringFromName(stringName.get(), formatStrings, NS_ARRAY_LENGTH(formatStrings), @@ -2313,6 +2316,9 @@ nsScriptSecurityManager::CanCreateWrapper(JSContext *cx, NS_ConvertUTF8toUTF16 className(objClassInfo.GetName()); const PRUnichar* formatStrings[] = { className.get() }; nsXPIDLString errorMsg; + // We need to keep our existing failure rv and not override it + // with a likely success code from the following string bundle + // call in order to throw the correct security exception later. nsresult rv2 = sStrBundle->FormatStringFromName(strName.get(), formatStrings,