Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/runtime.cc

Issue 131413008: Implement Microtask Delivery Queue (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix tests Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14574 matching lines...) Expand 10 before | Expand all | Expand 10 after
14585 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { 14585 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) {
14586 SealHandleScope shs(isolate); 14586 SealHandleScope shs(isolate);
14587 ASSERT(args.length() == 1); 14587 ASSERT(args.length() == 1);
14588 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); 14588 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0);
14589 bool old_state = isolate->microtask_pending(); 14589 bool old_state = isolate->microtask_pending();
14590 isolate->set_microtask_pending(new_state); 14590 isolate->set_microtask_pending(new_state);
14591 return isolate->heap()->ToBoolean(old_state); 14591 return isolate->heap()->ToBoolean(old_state);
14592 } 14592 }
14593 14593
14594 14594
14595 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunMicrotasks) {
14596 HandleScope scope(isolate);
14597 ASSERT(args.length() == 0);
14598 Execution::RunMicrotasks(isolate);
14599 return isolate->heap()->undefined_value();
14600 }
14601
14602
14595 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { 14603 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) {
14596 SealHandleScope shs(isolate); 14604 SealHandleScope shs(isolate);
14597 ASSERT(args.length() == 0); 14605 ASSERT(args.length() == 0);
14598 return isolate->heap()->observation_state(); 14606 return isolate->heap()->observation_state();
14599 } 14607 }
14600 14608
14601 14609
14602 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) { 14610 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObservationWeakMapCreate) {
14603 HandleScope scope(isolate); 14611 HandleScope scope(isolate);
14604 ASSERT(args.length() == 0); 14612 ASSERT(args.length() == 0);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
14860 // Handle last resort GC and make sure to allow future allocations 14868 // Handle last resort GC and make sure to allow future allocations
14861 // to grow the heap without causing GCs (if possible). 14869 // to grow the heap without causing GCs (if possible).
14862 isolate->counters()->gc_last_resort_from_js()->Increment(); 14870 isolate->counters()->gc_last_resort_from_js()->Increment();
14863 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14871 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14864 "Runtime::PerformGC"); 14872 "Runtime::PerformGC");
14865 } 14873 }
14866 } 14874 }
14867 14875
14868 14876
14869 } } // namespace v8::internal 14877 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698