Backed out 2 changesets (bug 1452204) for perma failing in memory/replace/dmd/test/test_dmd.js
authorMargareta Eliza Balazs <ebalazs@mozilla.com>
Tue, 05 Jun 2018 11:01:54 +0300
changeset 421258 a47957da1983ecb6d7b3ec323c84ec71421251b6
parent 421257 7cfd6a1fa407af606ae048ea762266ce84332a0e
child 421259 988847e0ed2ec4f3c87fa3cf92c08eb2a1acd18c
push id64850
push userebalazs@mozilla.com
push dateTue, 05 Jun 2018 08:02:06 +0000
treeherderautoland@a47957da1983 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1452204
milestone62.0a1
backs out4431cecd4c2d43fedc0acfa5016ef89a583d87b6
72fc40daf6cd1339caef2c9407255027c1f5baec
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
Backed out 2 changesets (bug 1452204) for perma failing in memory/replace/dmd/test/test_dmd.js Backed out changeset 4431cecd4c2d (bug 1452204) Backed out changeset 72fc40daf6cd (bug 1452204)
mozglue/misc/StackWalk.cpp
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
@@ -249,19 +249,20 @@ WalkStackMain64(struct WalkStackData* aD
 {
   // Get a context for the specified thread.
   CONTEXT context_buf;
   CONTEXT* context;
   if (!aData->context) {
     context = &context_buf;
     memset(context, 0, sizeof(CONTEXT));
     context->ContextFlags = CONTEXT_FULL;
-    if (aData->walkCallingThread) {
-      ::RtlCaptureContext(context);
-    } else if (!GetThreadContext(aData->thread, context)) {
+    if (!GetThreadContext(aData->thread, context)) {
+      if (aData->walkCallingThread) {
+        PrintError("GetThreadContext");
+      }
       return;
     }
   } else {
     context = aData->context;
   }
 
 #if defined(_M_IX86) || defined(_M_IA64)
   // Setup initial stack frame to walk from.
@@ -501,25 +502,19 @@ MozStackWalkThread(MozWalkStackCallback 
   InitializeDbgHelpCriticalSection();
 
   // EnsureWalkThreadReady's _beginthreadex takes a heap lock and must be
   // avoided if we're walking another (i.e. suspended) thread.
   if (!aThread && !EnsureWalkThreadReady()) {
     return;
   }
 
-  HANDLE targetThread = aThread;
-  if (!aThread) {
-    targetThread = ::GetCurrentThread();
-    data.walkCallingThread = true;
-  } else {
-    DWORD threadId = ::GetThreadId(aThread);
-    DWORD currentThreadId = ::GetCurrentThreadId();
-    data.walkCallingThread = (threadId == currentThreadId);
-  }
+  HANDLE currentThread = ::GetCurrentThread();
+  HANDLE targetThread = aThread ? aThread : currentThread;
+  data.walkCallingThread = (targetThread == currentThread);
 
   // Have to duplicate handle to get a real handle.
   if (!myProcess) {
     if (!::DuplicateHandle(::GetCurrentProcess(),
                            ::GetCurrentProcess(),
                            ::GetCurrentProcess(),
                            &myProcess,
                            PROCESS_ALL_ACCESS, FALSE, 0)) {