mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 933807 - Allow easily disabling TriggerOperationCallbackFor(Ion|AsmJS)Code (r=bhackett)
--HG-- extra : rebase_source : bcf49d894252af53a24aa08a0db25c99dedd26d9
This commit is contained in:
parent
55066274a3
commit
16541ad204
@ -591,6 +591,14 @@ JSRuntime::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Runtim
|
||||
rtSizes->scriptData += mallocSizeOf(r.front());
|
||||
}
|
||||
|
||||
static bool
|
||||
SignalBasedTriggersDisabled()
|
||||
{
|
||||
// Don't bother trying to cache the getenv lookup; this should be called
|
||||
// infrequently.
|
||||
return !!getenv("JS_DISABLE_SLOW_SCRIPT_SIGNALS");
|
||||
}
|
||||
|
||||
void
|
||||
JSRuntime::triggerOperationCallback(OperationCallbackTrigger trigger)
|
||||
{
|
||||
@ -611,8 +619,10 @@ JSRuntime::triggerOperationCallback(OperationCallbackTrigger trigger)
|
||||
* asm.js and, optionally, normal Ion code use memory protection and signal
|
||||
* handlers to halt running code.
|
||||
*/
|
||||
TriggerOperationCallbackForAsmJSCode(this);
|
||||
jit::TriggerOperationCallbackForIonCode(this, trigger);
|
||||
if (!SignalBasedTriggersDisabled()) {
|
||||
TriggerOperationCallbackForAsmJSCode(this);
|
||||
jit::TriggerOperationCallbackForIonCode(this, trigger);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user