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

Unified Diff: include/v8.h

Issue 1805903002: [serializer] Add API to warm up startup snapshot with an additional script. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comment Created 4 years, 9 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 | « Makefile ('k') | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 62319203f418c4522b103b3d54ced4e43f09971b..6f2bba09bf14d88060da0225f417f3d7b40df098 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -6276,11 +6276,23 @@ class V8_EXPORT V8 {
static void SetSnapshotDataBlob(StartupData* startup_blob);
/**
- * Create a new isolate and context for the purpose of capturing a snapshot
+ * Bootstrap an isolate and a context from scratch to create a startup
+ * snapshot. Include the side-effects of running the optional script.
* Returns { NULL, 0 } on failure.
- * The caller owns the data array in the return value.
+ * The caller acquires ownership of the data array in the return value.
*/
- static StartupData CreateSnapshotDataBlob(const char* custom_source = NULL);
+ static StartupData CreateSnapshotDataBlob(const char* embedded_source = NULL);
+
+ /**
+ * Bootstrap an isolate and a context from the cold startup blob, run the
+ * warm-up script to trigger code compilation. The side effects are then
+ * discarded. The resulting startup snapshot will include compiled code.
+ * Returns { NULL, 0 } on failure.
+ * The caller acquires ownership of the data array in the return value.
+ * The argument startup blob is untouched.
+ */
+ static StartupData WarmUpSnapshotDataBlob(StartupData cold_startup_blob,
+ const char* warmup_source);
/**
* Adds a message listener.
« no previous file with comments | « Makefile ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698