nsresult result = SetMedia(aSheet, aMedia);
NS_PRECONDITION(aSheet, "Must have a sheet!");  nsresult rv = NS_OK; aSheet->ClearMedia(); if (!aMedia.IsEmpty()) { rv = EnumerateMediaString(aMedia, MediumEnumFunc, aSheet); } NS_ENSURE_SUCCESS(rv, rv);
CSSLoaderImpl::PrepareSheet(nsICSSStyleSheet* aSheet, const nsString& aTitle,                             const nsString& aMedia){  nsresult result = SetMedia(aSheet, aMedia);    aSheet->SetTitle(aTitle);  return result;}