From 1a768b114310279a42c71c931a5378f0e996858a Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Wed, 7 Mar 2012 17:31:33 +0000 Subject: [PATCH] Profiler experiments: Honor postponing of interrupts in HandleStackGuardInterrupt Review URL: https://chromiumcodereview.appspot.com/9620009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/execution.cc | 9 +++++++++ src/execution.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/execution.cc b/src/execution.cc index 1f019820b..443d4b8d0 100644 --- a/src/execution.cc +++ b/src/execution.cc @@ -376,6 +376,12 @@ void StackGuard::DisableInterrupts() { } +bool StackGuard::ShouldPostponeInterrupts() { + ExecutionAccess access(isolate_); + return should_postpone_interrupts(access); +} + + bool StackGuard::IsInterrupted() { ExecutionAccess access(isolate_); return (thread_local_.interrupt_flags_ & INTERRUPT) != 0; @@ -874,6 +880,9 @@ void Execution::ProcessDebugMessages(bool debug_command_only) { MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { StackGuard* stack_guard = isolate->stack_guard(); + if (stack_guard->ShouldPostponeInterrupts()) { + return isolate->heap()->undefined_value(); + } if (stack_guard->IsGCRequest()) { isolate->heap()->CollectAllGarbage(false, "StackGuard GC request"); diff --git a/src/execution.h b/src/execution.h index d9ec9dccf..01e4b9da4 100644 --- a/src/execution.h +++ b/src/execution.h @@ -226,6 +226,7 @@ class StackGuard { Address address_of_real_jslimit() { return reinterpret_cast
(&thread_local_.real_jslimit_); } + bool ShouldPostponeInterrupts(); private: StackGuard(); -- 2.34.1