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 |
428 void StackGuard::TerminateExecution() { | 435 void StackGuard::TerminateExecution() { |
429 ExecutionAccess access(isolate_); | 436 ExecutionAccess access(isolate_); |
430 thread_local_.interrupt_flags_ |= TERMINATE; | 437 thread_local_.interrupt_flags_ |= TERMINATE; |
431 set_interrupt_limits(access); | 438 set_interrupt_limits(access); |
432 } | 439 } |
433 | 440 |
434 | 441 |
435 bool StackGuard::IsGCRequest() { | 442 bool StackGuard::IsGCRequest() { |
436 ExecutionAccess access(isolate_); | 443 ExecutionAccess access(isolate_); |
437 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; | 444 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 } | 903 } |
897 if (stack_guard->IsInterrupted()) { | 904 if (stack_guard->IsInterrupted()) { |
898 stack_guard->Continue(INTERRUPT); | 905 stack_guard->Continue(INTERRUPT); |
899 return isolate->StackOverflow(); | 906 return isolate->StackOverflow(); |
900 } | 907 } |
901 return isolate->heap()->undefined_value(); | 908 return isolate->heap()->undefined_value(); |
902 } | 909 } |
903 | 910 |
904 | 911 |
905 } } // namespace v8::internal | 912 } } // namespace v8::internal |
OLD | NEW |