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 14578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14589 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { | 14589 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { |
14590 SealHandleScope shs(isolate); | 14590 SealHandleScope shs(isolate); |
14591 ASSERT(args.length() == 1); | 14591 ASSERT(args.length() == 1); |
14592 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); | 14592 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); |
14593 bool old_state = isolate->microtask_pending(); | 14593 bool old_state = isolate->microtask_pending(); |
14594 isolate->set_microtask_pending(new_state); | 14594 isolate->set_microtask_pending(new_state); |
14595 return isolate->heap()->ToBoolean(old_state); | 14595 return isolate->heap()->ToBoolean(old_state); |
14596 } | 14596 } |
14597 | 14597 |
14598 | 14598 |
| 14599 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunMicrotasks) { |
| 14600 HandleScope scope(isolate); |
| 14601 ASSERT(args.length() == 0); |
| 14602 Execution::RunMicrotasks(isolate); |
| 14603 return isolate->heap()->undefined_value(); |
| 14604 } |
| 14605 |
| 14606 |
| 14607 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetMicrotaskState) { |
| 14608 SealHandleScope shs(isolate); |
| 14609 ASSERT(args.length() == 0); |
| 14610 return isolate->heap()->microtask_state(); |
| 14611 } |
| 14612 |
| 14613 |
14599 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { | 14614 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { |
14600 SealHandleScope shs(isolate); | 14615 SealHandleScope shs(isolate); |
14601 ASSERT(args.length() == 0); | 14616 ASSERT(args.length() == 0); |
14602 return isolate->heap()->observation_state(); | 14617 return isolate->heap()->observation_state(); |
14603 } | 14618 } |
14604 | 14619 |
14605 | 14620 |
14606 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { | 14621 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { |
14607 HandleScope scope(isolate); | 14622 HandleScope scope(isolate); |
14608 ASSERT(args.length() == 0); | 14623 ASSERT(args.length() == 0); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14864 // Handle last resort GC and make sure to allow future allocations | 14879 // Handle last resort GC and make sure to allow future allocations |
14865 // to grow the heap without causing GCs (if possible). | 14880 // to grow the heap without causing GCs (if possible). |
14866 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14881 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14867 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14882 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14868 "Runtime::PerformGC"); | 14883 "Runtime::PerformGC"); |
14869 } | 14884 } |
14870 } | 14885 } |
14871 | 14886 |
14872 | 14887 |
14873 } } // namespace v8::internal | 14888 } } // namespace v8::internal |
OLD | NEW |