Bug 801457 - XULRunner windows builds busted since Sep 22 in winEmbed, cannot convert from 'uint32_t' to 'nsresult'. r=bsmedberg
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 16 Oct 2012 11:21:52 +0900
changeset 110499 6f970ea66426bacf74f4eec4357358423b0ce4ea
parent 110498 bdb3e55bdddae77e5c982070b0973c1101a61792
child 110500 bf5f5e60f37c428e8ec10a4ad04758eedae7276e
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbsmedberg
bugs801457
milestone19.0a1
Bug 801457 - XULRunner windows builds busted since Sep 22 in winEmbed, cannot convert from 'uint32_t' to 'nsresult'. r=bsmedberg
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()
 {