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