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 14614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14625 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { | 14625 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { |
14626 SealHandleScope shs(isolate); | 14626 SealHandleScope shs(isolate); |
14627 ASSERT(args.length() == 1); | 14627 ASSERT(args.length() == 1); |
14628 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); | 14628 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); |
14629 bool old_state = isolate->microtask_pending(); | 14629 bool old_state = isolate->microtask_pending(); |
14630 isolate->set_microtask_pending(new_state); | 14630 isolate->set_microtask_pending(new_state); |
14631 return isolate->heap()->ToBoolean(old_state); | 14631 return isolate->heap()->ToBoolean(old_state); |
14632 } | 14632 } |
14633 | 14633 |
14634 | 14634 |
| 14635 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunMicrotasks) { |
| 14636 SealHandleScope shs(isolate); |
| 14637 ASSERT(args.length() == 0); |
| 14638 Execution::RunMicrotasks(isolate); |
| 14639 return isolate->heap()->undefined_value(); |
| 14640 } |
| 14641 |
| 14642 |
14635 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { | 14643 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { |
14636 SealHandleScope shs(isolate); | 14644 SealHandleScope shs(isolate); |
14637 ASSERT(args.length() == 0); | 14645 ASSERT(args.length() == 0); |
14638 return isolate->heap()->observation_state(); | 14646 return isolate->heap()->observation_state(); |
14639 } | 14647 } |
14640 | 14648 |
14641 | 14649 |
14642 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { | 14650 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { |
14643 HandleScope scope(isolate); | 14651 HandleScope scope(isolate); |
14644 ASSERT(args.length() == 0); | 14652 ASSERT(args.length() == 0); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14900 // Handle last resort GC and make sure to allow future allocations | 14908 // Handle last resort GC and make sure to allow future allocations |
14901 // to grow the heap without causing GCs (if possible). | 14909 // to grow the heap without causing GCs (if possible). |
14902 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14910 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14903 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14911 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14904 "Runtime::PerformGC"); | 14912 "Runtime::PerformGC"); |
14905 } | 14913 } |
14906 } | 14914 } |
14907 | 14915 |
14908 | 14916 |
14909 } } // namespace v8::internal | 14917 } } // namespace v8::internal |
OLD | NEW |