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

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

Issue 3004563002: Fixes for issues (Closed)
Patch Set: Created 3 years, 4 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 | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 Dart_Handle result = Dart_StringToCString(url, &url_string); 672 Dart_Handle result = Dart_StringToCString(url, &url_string);
673 if (Dart_IsError(result)) { 673 if (Dart_IsError(result)) {
674 return result; 674 return result;
675 } 675 }
676 if (tag == Dart_kKernelTag) { 676 if (tag == Dart_kKernelTag) {
677 ASSERT(dfe.UseDartFrontend() || dfe.kernel_file_specified()); 677 ASSERT(dfe.UseDartFrontend() || dfe.kernel_file_specified());
678 Dart_Isolate current = Dart_CurrentIsolate(); 678 Dart_Isolate current = Dart_CurrentIsolate();
679 ASSERT(!Dart_IsServiceIsolate(current) && !Dart_IsKernelIsolate(current)); 679 ASSERT(!Dart_IsServiceIsolate(current) && !Dart_IsKernelIsolate(current));
680 return dfe.ReadKernelBinary(current, url_string); 680 return dfe.ReadKernelBinary(current, url_string);
681 } 681 }
682 ASSERT(!dfe.UseDartFrontend() && !dfe.kernel_file_specified()); 682 ASSERT(Dart_IsKernelIsolate(Dart_CurrentIsolate()) ||
683 (!dfe.UseDartFrontend() && !dfe.kernel_file_specified()));
683 if (tag != Dart_kScriptTag) { 684 if (tag != Dart_kScriptTag) {
684 // Special case for handling dart: imports and parts. 685 // Special case for handling dart: imports and parts.
685 // Grab the library's url. 686 // Grab the library's url.
686 Dart_Handle library_url = Dart_LibraryUrl(library); 687 Dart_Handle library_url = Dart_LibraryUrl(library);
687 if (Dart_IsError(library_url)) { 688 if (Dart_IsError(library_url)) {
688 return library_url; 689 return library_url;
689 } 690 }
690 const char* library_url_string = NULL; 691 const char* library_url_string = NULL;
691 result = Dart_StringToCString(library_url, &library_url_string); 692 result = Dart_StringToCString(library_url, &library_url_string);
692 if (Dart_IsError(result)) { 693 if (Dart_IsError(result)) {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 MutexLocker ml(loader_infos_lock_); 928 MutexLocker ml(loader_infos_lock_);
928 Loader* loader = LoaderForLocked(dest_port_id); 929 Loader* loader = LoaderForLocked(dest_port_id);
929 if (loader == NULL) { 930 if (loader == NULL) {
930 return; 931 return;
931 } 932 }
932 loader->QueueMessage(message); 933 loader->QueueMessage(message);
933 } 934 }
934 935
935 } // namespace bin 936 } // namespace bin
936 } // namespace dart 937 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698