| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 set_interrupt_limits(access); | 418 set_interrupt_limits(access); |
| 419 } | 419 } |
| 420 | 420 |
| 421 | 421 |
| 422 bool StackGuard::IsTerminateExecution() { | 422 bool StackGuard::IsTerminateExecution() { |
| 423 ExecutionAccess access(isolate_); | 423 ExecutionAccess access(isolate_); |
| 424 return (thread_local_.interrupt_flags_ & TERMINATE) != 0; | 424 return (thread_local_.interrupt_flags_ & TERMINATE) != 0; |
| 425 } | 425 } |
| 426 | 426 |
| 427 | 427 |
| 428 void StackGuard::CancelTerminateExecution() { | |
| 429 ExecutionAccess access(isolate_); | |
| 430 Continue(TERMINATE); | |
| 431 isolate_->CancelTerminateExecution(); | |
| 432 } | |
| 433 | |
| 434 | |
| 435 void StackGuard::TerminateExecution() { | 428 void StackGuard::TerminateExecution() { |
| 436 ExecutionAccess access(isolate_); | 429 ExecutionAccess access(isolate_); |
| 437 thread_local_.interrupt_flags_ |= TERMINATE; | 430 thread_local_.interrupt_flags_ |= TERMINATE; |
| 438 set_interrupt_limits(access); | 431 set_interrupt_limits(access); |
| 439 } | 432 } |
| 440 | 433 |
| 441 | 434 |
| 442 bool StackGuard::IsGCRequest() { | 435 bool StackGuard::IsGCRequest() { |
| 443 ExecutionAccess access(isolate_); | 436 ExecutionAccess access(isolate_); |
| 444 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; | 437 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 } | 896 } |
| 904 if (stack_guard->IsInterrupted()) { | 897 if (stack_guard->IsInterrupted()) { |
| 905 stack_guard->Continue(INTERRUPT); | 898 stack_guard->Continue(INTERRUPT); |
| 906 return isolate->StackOverflow(); | 899 return isolate->StackOverflow(); |
| 907 } | 900 } |
| 908 return isolate->heap()->undefined_value(); | 901 return isolate->heap()->undefined_value(); |
| 909 } | 902 } |
| 910 | 903 |
| 911 | 904 |
| 912 } } // namespace v8::internal | 905 } } // namespace v8::internal |
| OLD | NEW |