| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 isolate, | 361 isolate, |
| 362 isolate->run_microtasks(), | 362 isolate->run_microtasks(), |
| 363 isolate->factory()->undefined_value(), | 363 isolate->factory()->undefined_value(), |
| 364 0, | 364 0, |
| 365 NULL, | 365 NULL, |
| 366 &threw); | 366 &threw); |
| 367 ASSERT(!threw); | 367 ASSERT(!threw); |
| 368 } | 368 } |
| 369 | 369 |
| 370 | 370 |
| 371 void Execution::EnqueueMicrotask(Isolate* isolate, Handle<Object> microtask) { |
| 372 bool threw = false; |
| 373 Handle<Object> args[] = { microtask }; |
| 374 Execution::Call( |
| 375 isolate, |
| 376 isolate->enqueue_external_microtask(), |
| 377 isolate->factory()->undefined_value(), |
| 378 1, |
| 379 args, |
| 380 &threw); |
| 381 ASSERT(!threw); |
| 382 } |
| 383 |
| 384 |
| 371 bool StackGuard::IsStackOverflow() { | 385 bool StackGuard::IsStackOverflow() { |
| 372 ExecutionAccess access(isolate_); | 386 ExecutionAccess access(isolate_); |
| 373 return (thread_local_.jslimit_ != kInterruptLimit && | 387 return (thread_local_.jslimit_ != kInterruptLimit && |
| 374 thread_local_.climit_ != kInterruptLimit); | 388 thread_local_.climit_ != kInterruptLimit); |
| 375 } | 389 } |
| 376 | 390 |
| 377 | 391 |
| 378 void StackGuard::EnableInterrupts() { | 392 void StackGuard::EnableInterrupts() { |
| 379 ExecutionAccess access(isolate_); | 393 ExecutionAccess access(isolate_); |
| 380 if (has_pending_interrupts(access)) { | 394 if (has_pending_interrupts(access)) { |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 ASSERT(isolate->concurrent_recompilation_enabled()); | 1048 ASSERT(isolate->concurrent_recompilation_enabled()); |
| 1035 stack_guard->Continue(INSTALL_CODE); | 1049 stack_guard->Continue(INSTALL_CODE); |
| 1036 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 1050 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
| 1037 } | 1051 } |
| 1038 isolate->runtime_profiler()->OptimizeNow(); | 1052 isolate->runtime_profiler()->OptimizeNow(); |
| 1039 return isolate->heap()->undefined_value(); | 1053 return isolate->heap()->undefined_value(); |
| 1040 } | 1054 } |
| 1041 | 1055 |
| 1042 | 1056 |
| 1043 } } // namespace v8::internal | 1057 } } // namespace v8::internal |
| OLD | NEW |