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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // throw a non-callable exception. | 347 // throw a non-callable exception. |
348 i::Handle<i::Object> error_obj = isolate->factory()->NewTypeError( | 348 i::Handle<i::Object> error_obj = isolate->factory()->NewTypeError( |
349 "called_non_callable", i::HandleVector<i::Object>(&object, 1)); | 349 "called_non_callable", i::HandleVector<i::Object>(&object, 1)); |
350 isolate->Throw(*error_obj); | 350 isolate->Throw(*error_obj); |
351 *has_pending_exception = true; | 351 *has_pending_exception = true; |
352 | 352 |
353 return isolate->factory()->undefined_value(); | 353 return isolate->factory()->undefined_value(); |
354 } | 354 } |
355 | 355 |
356 | 356 |
| 357 void Execution::RunMicrotasks(Isolate* isolate) { |
| 358 ASSERT(isolate->microtasks_pending()); |
| 359 bool threw = false; |
| 360 Execution::Call( |
| 361 isolate, |
| 362 isolate->run_microtasks(), |
| 363 isolate->factory()->undefined_value(), |
| 364 0, |
| 365 NULL, |
| 366 &threw); |
| 367 ASSERT(!threw); |
| 368 } |
| 369 |
| 370 |
357 bool StackGuard::IsStackOverflow() { | 371 bool StackGuard::IsStackOverflow() { |
358 ExecutionAccess access(isolate_); | 372 ExecutionAccess access(isolate_); |
359 return (thread_local_.jslimit_ != kInterruptLimit && | 373 return (thread_local_.jslimit_ != kInterruptLimit && |
360 thread_local_.climit_ != kInterruptLimit); | 374 thread_local_.climit_ != kInterruptLimit); |
361 } | 375 } |
362 | 376 |
363 | 377 |
364 void StackGuard::EnableInterrupts() { | 378 void StackGuard::EnableInterrupts() { |
365 ExecutionAccess access(isolate_); | 379 ExecutionAccess access(isolate_); |
366 if (has_pending_interrupts(access)) { | 380 if (has_pending_interrupts(access)) { |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 ASSERT(FLAG_concurrent_recompilation); | 968 ASSERT(FLAG_concurrent_recompilation); |
955 stack_guard->Continue(INSTALL_CODE); | 969 stack_guard->Continue(INSTALL_CODE); |
956 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 970 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
957 } | 971 } |
958 isolate->runtime_profiler()->OptimizeNow(); | 972 isolate->runtime_profiler()->OptimizeNow(); |
959 return isolate->heap()->undefined_value(); | 973 return isolate->heap()->undefined_value(); |
960 } | 974 } |
961 | 975 |
962 | 976 |
963 } } // namespace v8::internal | 977 } } // namespace v8::internal |
OLD | NEW |