Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: src/execution.h

Issue 1638009: Avoid messing with the stack overflow limits while interrupts... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.h
===================================================================
--- src/execution.h (revision 4400)
+++ src/execution.h (working copy)
@@ -199,12 +199,24 @@
private:
// You should hold the ExecutionAccess lock when calling this method.
- static bool IsSet(const ExecutionAccess& lock);
+ static bool has_pending_interrupts(const ExecutionAccess& lock) {
+ // Sanity check: We shouldn't be asking about pending interrupts
+ // unless we're not postponing them anymore.
+ ASSERT(!should_postpone_interrupts(lock));
+ return thread_local_.interrupt_flags_ != 0;
+ }
// You should hold the ExecutionAccess lock when calling this method.
- static void set_limits(uintptr_t value, const ExecutionAccess& lock) {
- thread_local_.jslimit_ = value;
- thread_local_.climit_ = value;
+ static bool should_postpone_interrupts(const ExecutionAccess& lock) {
+ return thread_local_.postpone_interrupts_nesting_ > 0;
+ }
+
+ // You should hold the ExecutionAccess lock when calling this method.
+ static void set_interrupt_limits(const ExecutionAccess& lock) {
+ // Ignore attempts to interrupt when interrupts are postponed.
+ if (should_postpone_interrupts(lock)) return;
+ thread_local_.jslimit_ = kInterruptLimit;
+ thread_local_.climit_ = kInterruptLimit;
Heap::SetStackLimits();
}
« no previous file with comments | « no previous file | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698