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 14542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14553 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { | 14553 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { |
14554 SealHandleScope shs(isolate); | 14554 SealHandleScope shs(isolate); |
14555 ASSERT(args.length() == 1); | 14555 ASSERT(args.length() == 1); |
14556 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); | 14556 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); |
14557 bool old_state = isolate->microtask_pending(); | 14557 bool old_state = isolate->microtask_pending(); |
14558 isolate->set_microtask_pending(new_state); | 14558 isolate->set_microtask_pending(new_state); |
14559 return isolate->heap()->ToBoolean(old_state); | 14559 return isolate->heap()->ToBoolean(old_state); |
14560 } | 14560 } |
14561 | 14561 |
14562 | 14562 |
| 14563 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunMicrotasks) { |
| 14564 SealHandleScope shs(isolate); |
| 14565 ASSERT(args.length() == 0); |
| 14566 Execution::RunMicrotasks(isolate); |
| 14567 return isolate->heap()->undefined_value(); |
| 14568 } |
| 14569 |
| 14570 |
14563 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { | 14571 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { |
14564 SealHandleScope shs(isolate); | 14572 SealHandleScope shs(isolate); |
14565 ASSERT(args.length() == 0); | 14573 ASSERT(args.length() == 0); |
14566 return isolate->heap()->observation_state(); | 14574 return isolate->heap()->observation_state(); |
14567 } | 14575 } |
14568 | 14576 |
14569 | 14577 |
14570 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { | 14578 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { |
14571 HandleScope scope(isolate); | 14579 HandleScope scope(isolate); |
14572 ASSERT(args.length() == 0); | 14580 ASSERT(args.length() == 0); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14828 // Handle last resort GC and make sure to allow future allocations | 14836 // Handle last resort GC and make sure to allow future allocations |
14829 // to grow the heap without causing GCs (if possible). | 14837 // to grow the heap without causing GCs (if possible). |
14830 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14838 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14831 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14839 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14832 "Runtime::PerformGC"); | 14840 "Runtime::PerformGC"); |
14833 } | 14841 } |
14834 } | 14842 } |
14835 | 14843 |
14836 | 14844 |
14837 } } // namespace v8::internal | 14845 } } // namespace v8::internal |
OLD | NEW |