mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
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:
parent
e1db4e7f60
commit
b74c53591a
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user