Bug 1120126 - Fix crash in RtlVirtualUnwind when starting the Gecko profiler on Win64. r=dmajor.

--HG--
extra : rebase_source : 46ed1ff91abf681d816a267f9496e0154b3d3542
This commit is contained in:
Nicholas Nethercote 2015-01-12 17:58:33 -08:00
parent 79d4008c7f
commit 96838d35f2

View File

@ -189,7 +189,13 @@ class SamplerThread : public Thread {
if (SuspendThread(profiled_thread) == kSuspendFailed)
return;
// CONTEXT_CONTROL is faster but we can't use it on 64-bit because it
// causes crashes in RtlVirtualUnwind (see bug 1120126).
#if V8_HOST_ARCH_X64
context.ContextFlags = CONTEXT_FULL;
#else
context.ContextFlags = CONTEXT_CONTROL;
#endif
if (GetThreadContext(profiled_thread, &context) != 0) {
#if V8_HOST_ARCH_X64
sample->pc = reinterpret_cast<Address>(context.Rip);