Bug 806209 followup - fix a stupid mistake; irc-r=BenWa
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 29 Oct 2012 14:18:14 -0400
changeset 111825 26095585dc5b018d88b8b600f8dae0117e567ceb
parent 111824 fda4bfed1a1bfb7719ed2b6e37da67320146f32e
child 111826 5a346b5852559c6186649680195cd3e55b96a124
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs806209
milestone19.0a1
Bug 806209 followup - fix a stupid mistake; irc-r=BenWa
xpcom/base/nsStackWalk.cpp
--- a/xpcom/base/nsStackWalk.cpp
+++ b/xpcom/base/nsStackWalk.cpp
@@ -301,18 +301,20 @@ WalkStackMain64(struct WalkStackData* da
     STACKFRAME64 frame64;
     // skip our own stack walking frames
     int skip = (data->walkCallingThread ? 3 : 0) + data->skipFrames;
     BOOL ok;
 
     // Get a context for the specified thread.
     memset(&context, 0, sizeof(CONTEXT));
     context.ContextFlags = CONTEXT_FULL;
-    if (!GetThreadContext(myThread, &context) && data->walkCallingThread) {
-        PrintError("GetThreadContext");
+    if (!GetThreadContext(myThread, &context)) {
+        if (data->walkCallingThread) {
+            PrintError("GetThreadContext");
+        }
         return;
     }
 
     // Setup initial stack frame to walk from
     memset(&frame64, 0, sizeof(frame64));
 #ifdef _M_IX86
     frame64.AddrPC.Offset    = context.Eip;
     frame64.AddrStack.Offset = context.Esp;