From cac704ffe4897537dd6d3a127dbe816d101d60e8 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 6 Jul 2011 13:29:26 -0400 Subject: [PATCH] Bug 648484, part 1: Fix some warning spam. r=roc --- dom/ipc/ContentParent.cpp | 8 +++++--- gfx/layers/d3d10/CanvasLayerD3D10.cpp | 1 + gfx/layers/d3d10/ColorLayerD3D10.cpp | 2 ++ gfx/layers/d3d10/ColorLayerD3D10.h | 1 - gfx/layers/d3d10/ContainerLayerD3D10.cpp | 1 + gfx/layers/d3d10/ContainerLayerD3D10.h | 1 - gfx/layers/d3d10/ThebesLayerD3D10.cpp | 3 ++- gfx/layers/d3d10/ThebesLayerD3D10.h | 1 - 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 45758f7b5090..5bfe47d17103 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -512,12 +512,14 @@ ContentParent::RecvGetClipboardText(const PRInt32& whichClipboard, nsString* tex clipboard->GetData(trans, whichClipboard); nsCOMPtr tmp; PRUint32 len; - rv = trans->GetTransferData(kUnicodeMime, getter_AddRefs(tmp), &len); - NS_ENSURE_SUCCESS(rv, rv); + rv = trans->GetTransferData(kUnicodeMime, getter_AddRefs(tmp), &len); + if (NS_FAILED(rv)) + return false; nsCOMPtr supportsString = do_QueryInterface(tmp); // No support for non-text data - NS_ENSURE_TRUE(supportsString, NS_ERROR_NOT_IMPLEMENTED); + if (!supportsString) + return false; supportsString->GetData(*text); return true; } diff --git a/gfx/layers/d3d10/CanvasLayerD3D10.cpp b/gfx/layers/d3d10/CanvasLayerD3D10.cpp index 64485c5d433f..d2879d458b5a 100644 --- a/gfx/layers/d3d10/CanvasLayerD3D10.cpp +++ b/gfx/layers/d3d10/CanvasLayerD3D10.cpp @@ -38,6 +38,7 @@ #include "CanvasLayerD3D10.h" +#include "../d3d9/Nv3DVUtils.h" #include "gfxImageSurface.h" #include "gfxWindowsSurface.h" #include "gfxWindowsPlatform.h" diff --git a/gfx/layers/d3d10/ColorLayerD3D10.cpp b/gfx/layers/d3d10/ColorLayerD3D10.cpp index 10fe3d98e1e0..5a12b8ec5530 100644 --- a/gfx/layers/d3d10/ColorLayerD3D10.cpp +++ b/gfx/layers/d3d10/ColorLayerD3D10.cpp @@ -38,6 +38,8 @@ #include "ColorLayerD3D10.h" +#include "../d3d9/Nv3DVUtils.h" + namespace mozilla { namespace layers { diff --git a/gfx/layers/d3d10/ColorLayerD3D10.h b/gfx/layers/d3d10/ColorLayerD3D10.h index 6238a466a464..2930d72e20f0 100644 --- a/gfx/layers/d3d10/ColorLayerD3D10.h +++ b/gfx/layers/d3d10/ColorLayerD3D10.h @@ -38,7 +38,6 @@ #ifndef GFX_COLORLAYERD3D10_H #define GFX_COLORLAYERD3D10_H -#include "Layers.h" #include "LayerManagerD3D10.h" namespace mozilla { diff --git a/gfx/layers/d3d10/ContainerLayerD3D10.cpp b/gfx/layers/d3d10/ContainerLayerD3D10.cpp index 15c5da348195..9ff98a6b3e7b 100644 --- a/gfx/layers/d3d10/ContainerLayerD3D10.cpp +++ b/gfx/layers/d3d10/ContainerLayerD3D10.cpp @@ -40,6 +40,7 @@ #include "gfxUtils.h" #include "nsRect.h" +#include "../d3d9/Nv3DVUtils.h" #include "ThebesLayerD3D10.h" #include "ReadbackProcessor.h" diff --git a/gfx/layers/d3d10/ContainerLayerD3D10.h b/gfx/layers/d3d10/ContainerLayerD3D10.h index 9f4746f5a3f7..e13a4b7d9d7d 100644 --- a/gfx/layers/d3d10/ContainerLayerD3D10.h +++ b/gfx/layers/d3d10/ContainerLayerD3D10.h @@ -38,7 +38,6 @@ #ifndef GFX_CONTAINERLAYERD3D10_H #define GFX_CONTAINERLAYERD3D10_H -#include "Layers.h" #include "LayerManagerD3D10.h" namespace mozilla { diff --git a/gfx/layers/d3d10/ThebesLayerD3D10.cpp b/gfx/layers/d3d10/ThebesLayerD3D10.cpp index 19abe6dabd46..9d43039f416a 100644 --- a/gfx/layers/d3d10/ThebesLayerD3D10.cpp +++ b/gfx/layers/d3d10/ThebesLayerD3D10.cpp @@ -43,6 +43,7 @@ #include "gfxD2DSurface.h" #endif +#include "../d3d9/Nv3DVUtils.h" #include "gfxTeeSurface.h" #include "gfxUtils.h" #include "ReadbackLayer.h" @@ -284,7 +285,7 @@ ThebesLayerD3D10::Validate(ReadbackProcessor *aReadback) device()->CreateTexture2D(&desc, NULL, getter_AddRefs(readbackTexture)); device()->CopyResource(readbackTexture, mTexture); - for (int i = 0; i < readbackUpdates.Length(); i++) { + for (PRUint32 i = 0; i < readbackUpdates.Length(); i++) { mD3DManager->readbackManager()->PostTask(readbackTexture, &readbackUpdates[i], gfxPoint(newTextureRect.x, newTextureRect.y)); diff --git a/gfx/layers/d3d10/ThebesLayerD3D10.h b/gfx/layers/d3d10/ThebesLayerD3D10.h index 9e5aa93ccb82..2b2d377bd428 100644 --- a/gfx/layers/d3d10/ThebesLayerD3D10.h +++ b/gfx/layers/d3d10/ThebesLayerD3D10.h @@ -38,7 +38,6 @@ #ifndef GFX_THEBESLAYERD3D10_H #define GFX_THEBESLAYERD3D10_H -#include "Layers.h" #include "LayerManagerD3D10.h" namespace mozilla {