diff --git a/embedding/tests/winEmbed/winEmbed.cpp b/embedding/tests/winEmbed/winEmbed.cpp index 7ea98f912168..8bc2b404d819 100644 --- a/embedding/tests/winEmbed/winEmbed.cpp +++ b/embedding/tests/winEmbed/winEmbed.cpp @@ -198,6 +198,8 @@ int main(int argc, char *argv[]) return 5; } + int result = 0; + // Scope all the XPCOM stuff { strcpy(lastslash, "\\xulrunner"); @@ -220,7 +222,6 @@ int main(int argc, char *argv[]) if (NS_FAILED(rv)) return 9; - int result = 0; if (NS_FAILED(StartupProfile())) { result = 8; } @@ -235,12 +236,12 @@ int main(int argc, char *argv[]) // 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