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

Unified Diff: runtime/bin/loader.cc

Issue 2523183002: VM: [Kernel] Go back to previous behavior in loader.cc (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/loader.cc
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc
index f92eb765e21cbccc5305ee91616b4424cbed45f7..d0a95e259d1ba412f5711041a3326516b02ff475 100644
--- a/runtime/bin/loader.cc
+++ b/runtime/bin/loader.cc
@@ -370,6 +370,13 @@ bool Loader::ProcessResultLocked(Loader* loader, Loader::IOResult* result) {
if (payload_type == DartUtils::kSnapshotMagicNumber) {
dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length);
reload_extensions = true;
+ } else if (payload_type == DartUtils::kKernelMagicNumber) {
+ // TODO(27590): This code path is only hit when trying to spawn
+ // isolates. We currently do not have support for neither
+ // `Isolate.spawn()` nor `Isolate.spawnUri()` with kernel-based
+ // frontend.
+ void* kernel_binary = Dart_ReadKernelBinary(payload, payload_length);
+ dart_result = Dart_LoadKernel(kernel_binary);
} else {
dart_result = Dart_LoadScript(uri, resolved_uri, source, 0, 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698