зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
22eff14ac5
Коммит
ade0e93eff
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче