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

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

Issue 2808953003: Revert "Fix updating packages map on reload and add a regression test" (Closed)
Patch Set: Created 3 years, 8 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/isolate_data.h ('k') | runtime/bin/vmservice/loader.dart » ('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 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 Dart_Handle library_url = Dart_LibraryUrl(library); 646 Dart_Handle library_url = Dart_LibraryUrl(library);
647 if (Dart_IsError(library_url)) { 647 if (Dart_IsError(library_url)) {
648 return library_url; 648 return library_url;
649 } 649 }
650 } 650 }
651 651
652 IsolateData* isolate_data = 652 IsolateData* isolate_data =
653 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); 653 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
654 ASSERT(isolate_data != NULL); 654 ASSERT(isolate_data != NULL);
655 if ((tag == Dart_kScriptTag) && Dart_IsString(library)) { 655
656 // Update packages file for isolate.
657 const char* packages_file = NULL;
658 Dart_Handle result = Dart_StringToCString(library, &packages_file);
659 if (Dart_IsError(result)) {
660 return result;
661 }
662 isolate_data->UpdatePackagesFile(packages_file);
663 }
664 // Grab this isolate's loader. 656 // Grab this isolate's loader.
665 Loader* loader = NULL; 657 Loader* loader = NULL;
666 658
667 // The outer invocation of the tag handler for this isolate. We make the outer 659 // The outer invocation of the tag handler for this isolate. We make the outer
668 // invocation block and allow any nested invocations to operate in parallel. 660 // invocation block and allow any nested invocations to operate in parallel.
669 const bool blocking_call = !isolate_data->HasLoader(); 661 const bool blocking_call = !isolate_data->HasLoader();
670 662
671 // If we are the outer invocation of the tag handler and the tag is an import 663 // If we are the outer invocation of the tag handler and the tag is an import
672 // this means that we are starting a deferred library load. 664 // this means that we are starting a deferred library load.
673 const bool is_deferred_import = blocking_call && (tag == Dart_kImportTag); 665 const bool is_deferred_import = blocking_call && (tag == Dart_kImportTag);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 MutexLocker ml(loader_infos_lock_); 863 MutexLocker ml(loader_infos_lock_);
872 Loader* loader = LoaderForLocked(dest_port_id); 864 Loader* loader = LoaderForLocked(dest_port_id);
873 if (loader == NULL) { 865 if (loader == NULL) {
874 return; 866 return;
875 } 867 }
876 loader->QueueMessage(message); 868 loader->QueueMessage(message);
877 } 869 }
878 870
879 } // namespace bin 871 } // namespace bin
880 } // namespace dart 872 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/vmservice/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698