| Index: src/isolate.h
|
| diff --git a/src/isolate.h b/src/isolate.h
|
| index ed2ed33ac74a432d44e9c7d5b3e20f2fc5b325bb..e2ab3fafa5a03dbd184ccebb1ffec7439be7ad31 100644
|
| --- a/src/isolate.h
|
| +++ b/src/isolate.h
|
| @@ -1420,22 +1420,29 @@ class StackLimitCheck BASE_EMBEDDED {
|
| // account.
|
| class PostponeInterruptsScope BASE_EMBEDDED {
|
| public:
|
| - explicit PostponeInterruptsScope(Isolate* isolate)
|
| - : stack_guard_(isolate->stack_guard()), isolate_(isolate) {
|
| - ExecutionAccess access(isolate_);
|
| - stack_guard_->thread_local_.postpone_interrupts_nesting_++;
|
| - stack_guard_->DisableInterrupts();
|
| + PostponeInterruptsScope(Isolate* isolate,
|
| + int intercept_mask = StackGuard::ALL_INTERRUPTS)
|
| + : stack_guard_(isolate->stack_guard()),
|
| + intercept_mask_(intercept_mask),
|
| + intercepted_flags_(0) {
|
| + stack_guard_->PushPostponeInterruptsScope(this);
|
| }
|
|
|
| ~PostponeInterruptsScope() {
|
| - ExecutionAccess access(isolate_);
|
| - if (--stack_guard_->thread_local_.postpone_interrupts_nesting_ == 0) {
|
| - stack_guard_->EnableInterrupts();
|
| - }
|
| + stack_guard_->PopPostponeInterruptsScope();
|
| }
|
| +
|
| + // Find the bottom-most scope that intercepts this interrupt.
|
| + // Return whether the interrupt has been intercepted.
|
| + bool Intercept(StackGuard::InterruptFlag flag);
|
| +
|
| private:
|
| StackGuard* stack_guard_;
|
| - Isolate* isolate_;
|
| + int intercept_mask_;
|
| + int intercepted_flags_;
|
| + PostponeInterruptsScope* prev_;
|
| +
|
| + friend class StackGuard;
|
| };
|
|
|
|
|
|
|