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

Unified Diff: runtime/include/dart_api.h

Issue 2998513002: [vm] Add a stub Dart_NotifyIdle() for the embedder to suggest a good time to do GC. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index e54a52d519adc1bbee5bd6edf539f23ff420e9b9..57d19192401e226ffafe788e670222d335bf1bf9 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -954,6 +954,18 @@ DART_EXPORT Dart_Handle Dart_DebugName();
*/
DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate);
+/**
+ * Notifies the VM that the embedder expects to be idle until |deadline|. The VM
+ * may use this time to perform garbage collection or other tasks to avoid
+ * delays during execution of Dart code in the future.
+ *
+ * |deadline| is measured in microseconds against the system's monotonic time.
+ * This clock can be accessed via Dart_TimelineGetMicros().
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT void Dart_NotifyIdle(int64_t deadline);
+
/**
* Notifies the VM that the current thread should not be profiled until a
* matching call to Dart_ThreadEnableProfiling is made.
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698