mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
Bug 1137050 - Don't SetThreadContext if the context didn't change. r=luke, a=me
This commit is contained in:
parent
fc8fe2bd7c
commit
67c2070e73
@ -1165,7 +1165,7 @@ RedirectIonBackedgesToInterruptCheck(JSRuntime *rt)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static bool
|
||||
RedirectJitCodeToInterruptCheck(JSRuntime *rt, CONTEXT *context)
|
||||
{
|
||||
RedirectIonBackedgesToInterruptCheck(rt);
|
||||
@ -1183,8 +1183,11 @@ RedirectJitCodeToInterruptCheck(JSRuntime *rt, CONTEXT *context)
|
||||
if (module.containsFunctionPC(pc)) {
|
||||
activation->setResumePC(pc);
|
||||
*ppc = module.interruptExit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !defined(XP_WIN)
|
||||
@ -1322,8 +1325,8 @@ js::InterruptRunningJitCode(JSRuntime *rt)
|
||||
CONTEXT context;
|
||||
context.ContextFlags = CONTEXT_CONTROL;
|
||||
if (GetThreadContext(thread, &context)) {
|
||||
RedirectJitCodeToInterruptCheck(rt, &context);
|
||||
SetThreadContext(thread, &context);
|
||||
if (RedirectJitCodeToInterruptCheck(rt, &context))
|
||||
SetThreadContext(thread, &context);
|
||||
}
|
||||
ResumeThread(thread);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user