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

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

Issue 2948273002: Correctly set root_library based on the application script URI instead of looking for the library t… (Closed)
Patch Set: Integrate cl from Siggi for front end change to not require a 'main' method when using the memory f… Created 3 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/main.cc » ('j') | 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 #include "bin/loader.h" 5 #include "bin/loader.h"
6 6
7 #include "bin/builtin.h" 7 #include "bin/builtin.h"
8 #include "bin/dartutils.h" 8 #include "bin/dartutils.h"
9 #include "bin/dfe.h" 9 #include "bin/dfe.h"
10 #include "bin/extensions.h" 10 #include "bin/extensions.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } break; 424 } break;
425 case Dart_kScriptTag: 425 case Dart_kScriptTag:
426 if (payload_type == DartUtils::kSnapshotMagicNumber) { 426 if (payload_type == DartUtils::kSnapshotMagicNumber) {
427 dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length); 427 dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length);
428 reload_extensions = true; 428 reload_extensions = true;
429 } else if (payload_type == DartUtils::kKernelMagicNumber) { 429 } else if (payload_type == DartUtils::kKernelMagicNumber) {
430 // TODO(27590): This code path is only hit when trying to spawn 430 // TODO(27590): This code path is only hit when trying to spawn
431 // isolates. We currently do not have support for neither 431 // isolates. We currently do not have support for neither
432 // `Isolate.spawn()` nor `Isolate.spawnUri()` with kernel-based 432 // `Isolate.spawn()` nor `Isolate.spawnUri()` with kernel-based
433 // frontend. 433 // frontend.
434 void* kernel_binary = Dart_ReadKernelBinary(payload, payload_length); 434 Dart_Handle kernel_binary = reinterpret_cast<Dart_Handle>(
435 dart_result = Dart_LoadKernel(kernel_binary); 435 Dart_ReadKernelBinary(payload, payload_length));
436 dart_result = Dart_LoadScript(uri, resolved_uri, kernel_binary, 0, 0);
436 } else { 437 } else {
437 dart_result = Dart_LoadScript(uri, resolved_uri, source, 0, 0); 438 dart_result = Dart_LoadScript(uri, resolved_uri, source, 0, 0);
438 } 439 }
439 break; 440 break;
440 default: 441 default:
441 UNREACHABLE(); 442 UNREACHABLE();
442 } 443 }
443 444
444 // Re-acquire the lock before exiting the function (it was held before entry), 445 // Re-acquire the lock before exiting the function (it was held before entry),
445 loader->monitor_->Enter(); 446 loader->monitor_->Enter();
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 MutexLocker ml(loader_infos_lock_); 895 MutexLocker ml(loader_infos_lock_);
895 Loader* loader = LoaderForLocked(dest_port_id); 896 Loader* loader = LoaderForLocked(dest_port_id);
896 if (loader == NULL) { 897 if (loader == NULL) {
897 return; 898 return;
898 } 899 }
899 loader->QueueMessage(message); 900 loader->QueueMessage(message);
900 } 901 }
901 902
902 } // namespace bin 903 } // namespace bin
903 } // namespace dart 904 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698