| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 set_interrupt_limits(access); | 416 set_interrupt_limits(access); |
| 417 } | 417 } |
| 418 | 418 |
| 419 | 419 |
| 420 bool StackGuard::IsTerminateExecution() { | 420 bool StackGuard::IsTerminateExecution() { |
| 421 ExecutionAccess access(isolate_); | 421 ExecutionAccess access(isolate_); |
| 422 return (thread_local_.interrupt_flags_ & TERMINATE) != 0; | 422 return (thread_local_.interrupt_flags_ & TERMINATE) != 0; |
| 423 } | 423 } |
| 424 | 424 |
| 425 | 425 |
| 426 void StackGuard::ResumeExecution() { | |
| 427 ASSERT(thread_local_.interrupt_flags_ & TERMINATE); | |
| 428 ExecutionAccess access(isolate_); | |
| 429 Continue(TERMINATE); | |
| 430 isolate_->ResumeExecution(); | |
| 431 } | |
| 432 | |
| 433 | |
| 434 void StackGuard::TerminateExecution() { | 426 void StackGuard::TerminateExecution() { |
| 435 ExecutionAccess access(isolate_); | 427 ExecutionAccess access(isolate_); |
| 436 thread_local_.interrupt_flags_ |= TERMINATE; | 428 thread_local_.interrupt_flags_ |= TERMINATE; |
| 437 set_interrupt_limits(access); | 429 set_interrupt_limits(access); |
| 438 } | 430 } |
| 439 | 431 |
| 440 | 432 |
| 441 void StackGuard::RequestCodeReadyEvent() { | 433 void StackGuard::RequestCodeReadyEvent() { |
| 442 ASSERT(FLAG_parallel_recompilation); | 434 ASSERT(FLAG_parallel_recompilation); |
| 443 if (ExecutionAccess::TryLock(isolate_)) { | 435 if (ExecutionAccess::TryLock(isolate_)) { |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 } | 941 } |
| 950 if (stack_guard->IsInterrupted()) { | 942 if (stack_guard->IsInterrupted()) { |
| 951 stack_guard->Continue(INTERRUPT); | 943 stack_guard->Continue(INTERRUPT); |
| 952 return isolate->StackOverflow(); | 944 return isolate->StackOverflow(); |
| 953 } | 945 } |
| 954 return isolate->heap()->undefined_value(); | 946 return isolate->heap()->undefined_value(); |
| 955 } | 947 } |
| 956 | 948 |
| 957 | 949 |
| 958 } } // namespace v8::internal | 950 } } // namespace v8::internal |
| OLD | NEW |