Bug 777292 - gfx/, widget/: Remove conversions to nsresult that will always result in NS_SUCCEEDED; r=roc
authorAryeh Gregor <ayg@aryeh.name>
Fri, 27 Jul 2012 16:52:43 +0300
changeset 100881 d64f195e9c43f2b0de92b2b0d1daa04f4e6077aa
parent 100880 6e30103582c44ea1ee8c25747bd3bed6671c0011
child 100882 20549037ff3dcd7b1c5ef892bbad584939c460db
push id12719
push userayg@aryeh.name
push dateMon, 30 Jul 2012 16:37:14 +0000
treeherdermozilla-inbound@ac1975f6837b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs777292
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 777292 - gfx/, widget/: Remove conversions to nsresult that will always result in NS_SUCCEEDED; r=roc
gfx/thebes/gfxFontUtils.cpp
widget/xpwidgets/nsBaseFilePicker.cpp
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -1836,24 +1836,20 @@ gfxFontUtils::ReadNames(FallibleTArray<P
         if (nameStringsBase + PRUint64(nameoff) + PRUint64(namelen) 
                 > nameTableLen) {
             NS_WARNING("invalid font (name table strings)");
             return NS_ERROR_FAILURE;
         }
         
         // -- decode if necessary and make nsString
         nsAutoString name;
-        nsresult rv;
         
-        rv = DecodeFontName(nameTable + nameStringsBase + nameoff, namelen, 
-                            platformID, PRUint32(nameRecord->encodingID),
-                            PRUint32(nameRecord->languageID), name);
-        
-        if (NS_FAILED(rv))
-            continue;
+        DecodeFontName(nameTable + nameStringsBase + nameoff, namelen,
+                       platformID, PRUint32(nameRecord->encodingID),
+                       PRUint32(nameRecord->languageID), name);
             
         PRUint32 k, numNames;
         bool foundName = false;
         
         numNames = aNames.Length();
         for (k = 0; k < numNames; k++) {
             if (name.Equals(aNames[k])) {
                 foundName = true;
--- a/widget/xpwidgets/nsBaseFilePicker.cpp
+++ b/widget/xpwidgets/nsBaseFilePicker.cpp
@@ -145,18 +145,17 @@ NS_IMETHODIMP nsBaseFilePicker::GetFiles
 
   // if we get into the base class, the platform
   // doesn't implement GetFiles() yet.
   // so we fake it.
   nsCOMPtr <nsIFile> file;
   rv = GetFile(getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = files.AppendObject(file);
-  NS_ENSURE_SUCCESS(rv,rv);
+  files.AppendObject(file);
 
   return NS_NewArrayEnumerator(aFiles, files);
 }
 
 #ifdef BASEFILEPICKER_HAS_DISPLAYDIRECTORY
 
 // Set the display directory
 NS_IMETHODIMP nsBaseFilePicker::SetDisplayDirectory(nsIFile *aDirectory)