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

Unified Diff: runtime/bin/fuchsia_test.cc

Issue 2171453002: Fuchsia: Make fuchsia_test use snapshots (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/sdk/@master
Patch Set: Created 4 years, 5 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/BUILD.gn ('k') | runtime/vm/os_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/fuchsia_test.cc
diff --git a/runtime/bin/fuchsia_test.cc b/runtime/bin/fuchsia_test.cc
index c6670b4dd2653ef2b538b12e971f490086fe8a52..d063612a450eff6eba0e11b2513b8180b5a8c855 100644
--- a/runtime/bin/fuchsia_test.cc
+++ b/runtime/bin/fuchsia_test.cc
@@ -19,6 +19,14 @@ const char* kHelloWorldScript = "main() { print(\"Hello, Fuchsia!\"); }";
namespace dart {
namespace bin {
+// vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
+// link in a snapshot otherwise it is initialized to NULL.
+extern const uint8_t* vm_isolate_snapshot_buffer;
+
+// isolate_snapshot_buffer points to a snapshot for an isolate if we link in a
+// snapshot otherwise it is initialized to NULL.
+extern const uint8_t* isolate_snapshot_buffer;
+
static void Builtin_PrintString(Dart_NativeArguments args) {
intptr_t length = 0;
uint8_t* chars = NULL;
@@ -139,7 +147,7 @@ int Main() {
}
Log::Print("Calling Dart_Initialize\n");
char* error = Dart_Initialize(
- NULL, NULL, NULL,
+ vm_isolate_snapshot_buffer, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL,
NULL,
@@ -156,7 +164,7 @@ int Main() {
Dart_Isolate isolate = Dart_CreateIsolate(
"script_uri",
"main",
- NULL,
+ isolate_snapshot_buffer,
NULL,
NULL,
&error);
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/vm/os_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698