Remove stray line breaks from NS_ERROR messages, since they interfere with log processing. rs=jst

--HG--
extra : rebase_source : 87421691da969e0ebe5fbfbc44cd8f18617d1351
This commit is contained in:
Jesse Ruderman 2010-06-17 13:28:38 -07:00
parent fb054fc73e
commit f04ef428cb
18 changed files with 27 additions and 27 deletions

View File

@ -542,7 +542,7 @@ nsXBLWindowKeyHandler::WalkHandlersAndExecute(nsIDOMKeyEvent* aKeyEvent,
domDoc->GetElementById(command, getter_AddRefs(commandElt));
if (!commandElt) {
NS_ERROR("A XUL <key> is observing a command that doesn't exist. Unable to execute key binding!\n");
NS_ERROR("A XUL <key> is observing a command that doesn't exist. Unable to execute key binding!");
continue;
}
}

View File

@ -693,7 +693,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent_IOSurface(const NPRemoteEvent& event,
NPCocoaEvent evcopy = event.event;
nsIOSurface* surf = nsIOSurface::LookupSurface(surfaceid);
if (!surf) {
NS_ERROR("Invalid IOSurface.\n");
NS_ERROR("Invalid IOSurface.");
*handled = false;
return false;
}

View File

@ -416,7 +416,7 @@ EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords,
GtkWidget *toplevel_window;
toplevel_window = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget));
if (!GTK_WINDOW(toplevel_window)) {
NS_ERROR("no gtk window in hierarchy!\n");
NS_ERROR("no gtk window in hierarchy!");
return NS_ERROR_FAILURE;
}
gtk_window_set_transient_for(GTK_WINDOW(sTipWindow),

View File

@ -538,7 +538,7 @@ nsresult nsCARenderer::SetupRenderer(void *aCALayer, int aWidth, int aHeight) {
GLenum fboStatus;
fboStatus = ::glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (fboStatus != GL_FRAMEBUFFER_COMPLETE_EXT) {
NS_ERROR("FBO not supported\n");
NS_ERROR("FBO not supported");
if (oldContext)
::CGLSetCurrentContext(oldContext);
Destroy();
@ -563,7 +563,7 @@ nsresult nsCARenderer::SetupRenderer(void *aCALayer, int aWidth, int aHeight) {
GLenum result = ::glGetError();
if (result != GL_NO_ERROR) {
NS_ERROR("Unexpected OpenGL Error\n");
NS_ERROR("Unexpected OpenGL Error");
Destroy();
if (oldContext)
::CGLSetCurrentContext(oldContext);
@ -633,7 +633,7 @@ nsresult nsCARenderer::Render(int aWidth, int aHeight,
GLenum result = ::glGetError();
if (result != GL_NO_ERROR) {
NS_ERROR("Unexpected OpenGL Error\n");
NS_ERROR("Unexpected OpenGL Error");
Destroy();
if (oldContext)
::CGLSetCurrentContext(oldContext);

View File

@ -357,7 +357,7 @@ nsIsIndexFrame::OnSubmit(nsPresContext* aPresContext)
// Resolve url to an absolute url
nsIURI *baseURI = document->GetDocBaseURI();
if (!baseURI) {
NS_ERROR("No Base URL found in Form Submit!\n");
NS_ERROR("No Base URL found in Form Submit!");
return NS_OK; // No base URL -> exit early, see Bug 30721
}
@ -390,7 +390,7 @@ nsIsIndexFrame::OnSubmit(nsPresContext* aPresContext)
href.Truncate(queryStart);
}
} else {
NS_ERROR("Rel path couldn't be formed in form submit!\n");
NS_ERROR("Rel path couldn't be formed in form submit!");
return NS_ERROR_OUT_OF_MEMORY;
}

View File

@ -5437,7 +5437,7 @@ nsIFrame::GetFrameFromDirection(nsDirection aDirection, PRBool aVisual,
for (;lineFrameCount > 1;lineFrameCount --){
result = it->GetNextSiblingOnLine(lastFrame, thisLine);
if (NS_FAILED(result) || !lastFrame){
NS_ERROR("should not be reached nsFrame\n");
NS_ERROR("should not be reached nsFrame");
return NS_ERROR_FAILURE;
}
}

View File

@ -779,7 +779,7 @@ nsFrameSelection::FetchDesiredX(nscoord &aDesiredX) //the x position requested b
{
if (!mShell)
{
NS_ERROR("fetch desired X failed\n");
NS_ERROR("fetch desired X failed");
return NS_ERROR_FAILURE;
}
if (mDesiredXSet)

View File

@ -283,7 +283,7 @@ nsStyleContext::GetUniqueStyleData(const nsStyleStructID& aSID)
#undef UNIQUE_CASE
default:
NS_ERROR("Struct type not supported. Please find another way to do this if you can!\n");
NS_ERROR("Struct type not supported. Please find another way to do this if you can!");
return nsnull;
}

View File

@ -147,7 +147,7 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState)
// Get the start y position.
nsListBoxBodyFrame* body = static_cast<nsListBoxBodyFrame*>(aBox);
if (!body) {
NS_ERROR("Frame encountered that isn't a listboxbody!\n");
NS_ERROR("Frame encountered that isn't a listboxbody!");
return NS_ERROR_FAILURE;
}

View File

@ -211,7 +211,7 @@ nsresult imgFrame::Init(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,
if (aPaletteDepth != 0) {
// We're creating for a paletted image.
if (aPaletteDepth > 8) {
NS_ERROR("This Depth is not supported\n");
NS_ERROR("This Depth is not supported");
return NS_ERROR_FAILURE;
}

View File

@ -374,7 +374,7 @@ nsNSSCertificateDB::handleCACertDownload(nsIArray *x509Certs,
der.len = 0;
if (!tmpCert) {
NS_ERROR("Couldn't create cert from DER blob\n");
NS_ERROR("Couldn't create cert from DER blob");
return NS_ERROR_FAILURE;
}
@ -447,7 +447,7 @@ nsNSSCertificateDB::handleCACertDownload(nsIArray *x509Certs,
der.len = 0;
if (!tmpCert2) {
NS_ERROR("Couldn't create temp cert from DER blob\n");
NS_ERROR("Couldn't create temp cert from DER blob");
continue; // Let's try to import the rest of 'em
}
@ -1693,7 +1693,7 @@ NS_IMETHODIMP nsNSSCertificateDB::AddCertFromBase64(const char *aBase64, const c
der.len = 0;
if (!tmpCert) {
NS_ERROR("Couldn't create cert from DER blob\n");
NS_ERROR("Couldn't create cert from DER blob");
return NS_ERROR_FAILURE;
}

View File

@ -1748,7 +1748,7 @@ nsNativeAppSupportOS2::OpenBrowserWindow()
}
}
NS_ERROR("failed to hand off external URL to extant window\n");
NS_ERROR("failed to hand off external URL to extant window");
} while ( PR_FALSE );
// open a new window if caller requested it or if anything above failed

View File

@ -1600,7 +1600,7 @@ nsNativeAppSupportWin::OpenBrowserWindow()
}
}
NS_ERROR("failed to hand off external URL to extant window\n");
NS_ERROR("failed to hand off external URL to extant window");
} while ( PR_FALSE );
// open a new window if caller requested it or if anything above failed

View File

@ -215,12 +215,12 @@ nsCocoaWindow::~nsCocoaWindow()
static bool WindowSizeAllowed(PRInt32 aWidth, PRInt32 aHeight)
{
if (aWidth > SIZE_LIMIT) {
NS_ERROR(nsPrintfCString(256, "Requested Cocoa window width of %d is too much, max allowed is %d\n",
NS_ERROR(nsPrintfCString(256, "Requested Cocoa window width of %d is too much, max allowed is %d",
aWidth, SIZE_LIMIT).get());
return false;
}
if (aHeight > SIZE_LIMIT) {
NS_ERROR(nsPrintfCString(256, "Requested Cocoa window height of %d is too much, max allowed is %d\n",
NS_ERROR(nsPrintfCString(256, "Requested Cocoa window height of %d is too much, max allowed is %d",
aHeight, SIZE_LIMIT).get());
return false;
}

View File

@ -117,7 +117,7 @@ nsMenuItemIconX::SetupIcon()
// Still don't have one, then something is wrong, get out of here.
if (!mNativeMenuItem) {
NS_ERROR("No native menu item\n");
NS_ERROR("No native menu item");
return NS_ERROR_FAILURE;
}

View File

@ -264,7 +264,7 @@ nsScreenManagerGtk :: ScreenForRect ( PRInt32 aX, PRInt32 aY,
nsresult rv;
rv = EnsureInit();
if (NS_FAILED(rv)) {
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from ScreenForRect\n");
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from ScreenForRect");
return rv;
}
// which screen ( index from zero ) should we return?
@ -310,7 +310,7 @@ nsScreenManagerGtk :: GetPrimaryScreen(nsIScreen * *aPrimaryScreen)
nsresult rv;
rv = EnsureInit();
if (NS_FAILED(rv)) {
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from GetPrimaryScreen\n");
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from GetPrimaryScreen");
return rv;
}
*aPrimaryScreen = mCachedScreenArray.SafeObjectAt(0);
@ -331,7 +331,7 @@ nsScreenManagerGtk :: GetNumberOfScreens(PRUint32 *aNumberOfScreens)
nsresult rv;
rv = EnsureInit();
if (NS_FAILED(rv)) {
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from GetNumberOfScreens\n");
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from GetNumberOfScreens");
return rv;
}
*aNumberOfScreens = mCachedScreenArray.Count();
@ -345,7 +345,7 @@ nsScreenManagerGtk :: ScreenForNativeWidget (void *aWidget, nsIScreen **outScree
nsresult rv;
rv = EnsureInit();
if (NS_FAILED(rv)) {
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from ScreenForNativeWidget\n");
NS_ERROR("nsScreenManagerGtk::EnsureInit() failed from ScreenForNativeWidget");
return rv;
}

View File

@ -1650,7 +1650,7 @@ nsTextStore::Initialize(void)
if (sTsfThreadMgr && !sTsfTextStore) {
sTsfTextStore = new nsTextStore();
if (!sTsfTextStore)
NS_ERROR("failed to create text store\n");
NS_ERROR("failed to create text store");
}
if (sTsfThreadMgr && !sDisplayAttrMgr) {
HRESULT hr =

View File

@ -420,7 +420,7 @@ nsHTTPIndex::OnIndexAvailable(nsIRequest* aRequest, nsISupports *aContext,
const char* baseStr;
parentRes->GetValueConst(&baseStr);
if (! baseStr) {
NS_ERROR("Could not reconstruct base uri\n");
NS_ERROR("Could not reconstruct base uri");
return NS_ERROR_UNEXPECTED;
}