if (NS_FAILED(stack->Peek(&cx))) return nsnull; return cx;
if (NS_FAILED(stack->Peek(&cx))) { return; }  if (!cx) { return; }  nsISupports *priv = (nsISupports *)::JS_GetContextPrivate(cx);  if (!priv) { return; }  CallQueryInterface(priv, aScriptContext);  return;
GetCurrentContext(){  // Get JSContext from stack.  nsresult rv;  NS_WITH_SERVICE(nsIJSContextStack, stack, "@mozilla.org/js/xpc/ContextStack;1",                   &rv);  if (NS_FAILED(rv))    return nsnull;  JSContext *cx;  if (NS_FAILED(stack->Peek(&cx)))    return nsnull;  return cx;}