nsresult rv;  if (mCurrentContext) { nsCOMPtr<nsICanvasRenderingContextInternal> internalctx(do_QueryInterface(mCurrentContext));  rv = internalctx->SetTargetImageFrame(mImageFrame); NS_ENSURE_SUCCESS(rv, rv); }
if (mCurrentContext) return mCurrentContext->SetTargetImageFrame(mImageFrame);
nsHTMLCanvasElement::UpdateContext(){  nsresult rv;  if (mCurrentContext) {    nsCOMPtr<nsICanvasRenderingContextInternal> internalctx(do_QueryInterface(mCurrentContext));    rv = internalctx->SetTargetImageFrame(mImageFrame);    NS_ENSURE_SUCCESS(rv, rv);  }  return NS_OK;}