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

Side by Side Diff: runtime/bin/loader.cc

Issue 2523183002: VM: [Kernel] Go back to previous behavior in loader.cc (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 #include "bin/loader.h" 6 #include "bin/loader.h"
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/dartutils.h" 9 #include "bin/dartutils.h"
10 #include "bin/extensions.h" 10 #include "bin/extensions.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 case Dart_kSourceTag: { 363 case Dart_kSourceTag: {
364 ASSERT(library_uri != Dart_Null()); 364 ASSERT(library_uri != Dart_Null());
365 Dart_Handle library = Dart_LookupLibrary(library_uri); 365 Dart_Handle library = Dart_LookupLibrary(library_uri);
366 ASSERT(!Dart_IsError(library)); 366 ASSERT(!Dart_IsError(library));
367 dart_result = Dart_LoadSource(library, uri, resolved_uri, source, 0, 0); 367 dart_result = Dart_LoadSource(library, uri, resolved_uri, source, 0, 0);
368 } break; 368 } break;
369 case Dart_kScriptTag: 369 case Dart_kScriptTag:
370 if (payload_type == DartUtils::kSnapshotMagicNumber) { 370 if (payload_type == DartUtils::kSnapshotMagicNumber) {
371 dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length); 371 dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length);
372 reload_extensions = true; 372 reload_extensions = true;
373 } else if (payload_type == DartUtils::kKernelMagicNumber) {
374 // TODO(27590): This code path is only hit when trying to spawn
375 // isolates. We currently do not have support for neither
376 // `Isolate.spawn()` nor `Isolate.spawnUri()` with kernel-based
377 // frontend.
378 void* kernel_binary = Dart_ReadKernelBinary(payload, payload_length);
379 dart_result = Dart_LoadKernel(kernel_binary);
373 } else { 380 } else {
374 dart_result = Dart_LoadScript(uri, resolved_uri, source, 0, 0); 381 dart_result = Dart_LoadScript(uri, resolved_uri, source, 0, 0);
375 } 382 }
376 break; 383 break;
377 default: 384 default:
378 UNREACHABLE(); 385 UNREACHABLE();
379 } 386 }
380 387
381 // Re-acquire the lock before exiting the function (it was held before entry), 388 // Re-acquire the lock before exiting the function (it was held before entry),
382 loader->monitor_->Enter(); 389 loader->monitor_->Enter();
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 MutexLocker ml(loader_infos_lock_); 800 MutexLocker ml(loader_infos_lock_);
794 Loader* loader = LoaderForLocked(dest_port_id); 801 Loader* loader = LoaderForLocked(dest_port_id);
795 if (loader == NULL) { 802 if (loader == NULL) {
796 return; 803 return;
797 } 804 }
798 loader->QueueMessage(message); 805 loader->QueueMessage(message);
799 } 806 }
800 807
801 } // namespace bin 808 } // namespace bin
802 } // namespace dart 809 } // namespace dart
OLDNEW
« 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