Bug 801457 - XULRunner windows builds busted since Sep 22 in winEmbed, cannot convert from 'uint32_t' to 'nsresult'. r=bsmedberg a=bajaj
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 16 Oct 2012 11:21:52 +0900
changeset 116210 1260bf2d4bdd65a26ada0520dd9f31da69fb4105
parent 116209 721b1865e7f849b58d4aa38623ec38feedb07f9b
child 116211 03d9d6422563bc87f249c5e16298b0a60cf05fd7
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, bajaj
bugs801457
milestone18.0a2
Bug 801457 - XULRunner windows builds busted since Sep 22 in winEmbed, cannot convert from 'uint32_t' to 'nsresult'. r=bsmedberg a=bajaj
embedding/tests/winEmbed/winEmbed.cpp
--- a/embedding/tests/winEmbed/winEmbed.cpp
+++ b/embedding/tests/winEmbed/winEmbed.cpp
@@ -193,16 +193,18 @@ int main(int argc, char *argv[])
 
     XRE_TermEmbedding =
         (XRE_TermEmbeddingType) GetProcAddress(xulModule, "XRE_TermEmbedding");
     if (!XRE_TermEmbedding) {
         fprintf(stderr, "Error: %i\n", GetLastError());
         return 5;
     }
 
+    int result = 0;
+
     // Scope all the XPCOM stuff
     {
         strcpy(lastslash, "\\xulrunner");
 
         nsCOMPtr<nsIFile> xuldir;
         rv = NS_NewNativeLocalFile(nsCString(path), false,
                                    getter_AddRefs(xuldir));
         if (NS_FAILED(rv))
@@ -215,37 +217,36 @@ int main(int argc, char *argv[])
                                    getter_AddRefs(appdir));
         if (NS_FAILED(rv))
             return 8;
 
         rv = XRE_InitEmbedding2(xuldir, appdir, nullptr);
         if (NS_FAILED(rv))
             return 9;
 
-        int result = 0;
         if (NS_FAILED(StartupProfile())) {
             result = 8;
         }
         else {
             InitializeWindowCreator();
 
             // Open the initial browser window
             OpenWebPage(gFirstURL);
 
             // Main message loop.
             // NOTE: We use a fake event and a timeout in order to process idle stuff for
             //       Mozilla every 1/10th of a second.
             bool runCondition = true;
 
-            rv = AppCallbacks::RunEventLoop(runCondition);
+            result = AppCallbacks::RunEventLoop(runCondition);
         }
     }
     XRE_TermEmbedding();
 
-    return rv;
+    return result;
 }
 
 /* InitializeWindowCreator creates and hands off an object with a callback
    to a window creation function. This is how all new windows are opened,
    except any created directly by the embedding app. */
 nsresult
 InitializeWindowCreator()
 {