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