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

Unified Diff: runtime/include/dart_api.h

Issue 1411853003: Service isolate requests Observatory assets from embedder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « runtime/bin/vmservice/vmservice_io.dart ('k') | runtime/lib/vmservice.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 b851d717b46949b88a07befe3d50954836398270..b77cc427ef42d27d2ded2002179d754527954701 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -868,6 +868,18 @@ typedef void (*Dart_FileCloseCallback)(void* stream);
typedef bool (*Dart_EntropySource)(uint8_t* buffer, intptr_t length);
/**
+ * Callback provided by the embedder that is used by the vmservice isolate
+ * to request the asset archive. The asset archive must be an uncompressed tar
+ * archive that is stored in a Uint8List.
+ *
+ * If the embedder has no vmservice isolate assets, the callback can be NULL.
+ *
+ * \return The embedder must return a handle to a Uint8List containing an
+ * uncompressed tar archive or null.
+ */
+typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)();
+
+/**
* Initializes the VM.
*
* \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate
@@ -883,6 +895,10 @@ typedef bool (*Dart_EntropySource)(uint8_t* buffer, intptr_t length);
* \param shutdown A function to be called when an isolate is shutdown.
* See Dart_IsolateShutdownCallback.
*
+ * \param get_service_assets A function to be called by the service isolate when
+ * it requires the vmservice assets archive.
+ * See Dart_GetVMServiceAssetsArchive.
+ *
* \return NULL if initialization is successful. Returns an error message
* otherwise. The caller is responsible for freeing the error message.
*/
@@ -897,7 +913,8 @@ DART_EXPORT char* Dart_Initialize(
Dart_FileReadCallback file_read,
Dart_FileWriteCallback file_write,
Dart_FileCloseCallback file_close,
- Dart_EntropySource entropy_source);
+ Dart_EntropySource entropy_source,
+ Dart_GetVMServiceAssetsArchive get_service_assets);
/**
* Cleanup state in the VM before process termination.
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | runtime/lib/vmservice.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698