Fixing bug 86191. Don't return nsnull as a nsresult, return NS_OK in stead. r=sicking@bigfoot.com, sr=nobody, trivial change.

This commit is contained in:
jst%netscape.com 2002-01-06 02:39:13 +00:00
Родитель 22eff14ac5
Коммит ade0e93eff
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -135,13 +135,16 @@ nsresult
nsContentUtils::GetDynamicScriptContext(JSContext *aContext,
nsIScriptContext** aScriptContext)
{
*aScriptContext = nsnull;
// XXX We rely on the rule that if any JSContext in our JSRuntime has a
// private set then that private *must* be a pointer to an nsISupports.
nsISupports *supports = (nsIScriptContext*) JS_GetContextPrivate(aContext);
if (!supports)
return nsnull;
return supports->QueryInterface(NS_GET_IID(nsIScriptContext),
(void**)aScriptContext);
nsISupports *supports = (nsIScriptContext*)JS_GetContextPrivate(aContext);
if (!supports) {
return NS_OK;
}
return CallQueryInterface(supports, aScriptContext);
}
template <class OutputIterator>