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

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

Issue 2990833002: Fix for issue 29819 (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 | « runtime/bin/dfe.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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 return library_url; 628 return library_url;
629 } 629 }
630 return Dart_DefaultCanonicalizeUrl(library_url, url); 630 return Dart_DefaultCanonicalizeUrl(library_url, url);
631 } 631 }
632 const char* url_string = NULL; 632 const char* url_string = NULL;
633 Dart_Handle result = Dart_StringToCString(url, &url_string); 633 Dart_Handle result = Dart_StringToCString(url, &url_string);
634 if (Dart_IsError(result)) { 634 if (Dart_IsError(result)) {
635 return result; 635 return result;
636 } 636 }
637 if (tag == Dart_kScriptTag) { 637 if (tag == Dart_kScriptTag) {
638 if (dfe.UseDartFrontend()) { 638 if (dfe.UseDartFrontend() || dfe.kernel_file_specified()) {
639 Dart_Isolate current = Dart_CurrentIsolate(); 639 Dart_Isolate current = Dart_CurrentIsolate();
640 // Check if we are trying to reload a kernel file or if the '--dfe' 640 // Check if we are trying to reload a kernel file or if the '--dfe'
641 // option was specified and we need to compile sources using DFE. 641 // option was specified and we need to compile sources using DFE.
642 if (!Dart_IsServiceIsolate(current) && !Dart_IsKernelIsolate(current)) { 642 if (!Dart_IsServiceIsolate(current) && !Dart_IsKernelIsolate(current)) {
643 // When using DFE the library tag handler should be called only when 643 // When using DFE the library tag handler should be called only when
644 // we are reloading scripts. 644 // we are reloading scripts.
645 return dfe.ReloadScript(current, url_string); 645 return dfe.ReloadScript(current, url_string);
646 } 646 }
647 } 647 }
648 // TODO(asiva) We need to ensure that the kernel and service isolates 648 // TODO(asiva) We need to ensure that the kernel and service isolates
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 MutexLocker ml(loader_infos_lock_); 895 MutexLocker ml(loader_infos_lock_);
896 Loader* loader = LoaderForLocked(dest_port_id); 896 Loader* loader = LoaderForLocked(dest_port_id);
897 if (loader == NULL) { 897 if (loader == NULL) {
898 return; 898 return;
899 } 899 }
900 loader->QueueMessage(message); 900 loader->QueueMessage(message);
901 } 901 }
902 902
903 } // namespace bin 903 } // namespace bin
904 } // namespace dart 904 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dfe.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698