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

Side by Side Diff: src/execution.cc

Issue 14401008: Add methods to allow resuming execution after calling TerminateExecution(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/execution.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 set_interrupt_limits(access); 419 set_interrupt_limits(access);
420 } 420 }
421 421
422 422
423 bool StackGuard::IsTerminateExecution() { 423 bool StackGuard::IsTerminateExecution() {
424 ExecutionAccess access(isolate_); 424 ExecutionAccess access(isolate_);
425 return (thread_local_.interrupt_flags_ & TERMINATE) != 0; 425 return (thread_local_.interrupt_flags_ & TERMINATE) != 0;
426 } 426 }
427 427
428 428
429 void StackGuard::CancelTerminateExecution() {
430 ExecutionAccess access(isolate_);
431 Continue(TERMINATE);
432 isolate_->CancelTerminateExecution();
433 }
434
435
429 void StackGuard::TerminateExecution() { 436 void StackGuard::TerminateExecution() {
430 ExecutionAccess access(isolate_); 437 ExecutionAccess access(isolate_);
431 thread_local_.interrupt_flags_ |= TERMINATE; 438 thread_local_.interrupt_flags_ |= TERMINATE;
432 set_interrupt_limits(access); 439 set_interrupt_limits(access);
433 } 440 }
434 441
435 442
436 bool StackGuard::IsGCRequest() { 443 bool StackGuard::IsGCRequest() {
437 ExecutionAccess access(isolate_); 444 ExecutionAccess access(isolate_);
438 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; 445 return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 921 }
915 if (stack_guard->IsFullDeopt()) { 922 if (stack_guard->IsFullDeopt()) {
916 stack_guard->Continue(FULL_DEOPT); 923 stack_guard->Continue(FULL_DEOPT);
917 Deoptimizer::DeoptimizeAll(isolate); 924 Deoptimizer::DeoptimizeAll(isolate);
918 } 925 }
919 return isolate->heap()->undefined_value(); 926 return isolate->heap()->undefined_value();
920 } 927 }
921 928
922 929
923 } } // namespace v8::internal 930 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698