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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 1430603002: Make the computation of import chain to disallowed library use correct uri. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart2js.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 EventSink, 8 EventSink,
9 Future; 9 Future;
10 10
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 /// 676 ///
677 /// [loadedLibraries] contains the newly loaded libraries. 677 /// [loadedLibraries] contains the newly loaded libraries.
678 /// 678 ///
679 /// The method returns a [Future] allowing for the loading of additional 679 /// The method returns a [Future] allowing for the loading of additional
680 /// libraries. 680 /// libraries.
681 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { 681 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
682 return new Future.sync(() { 682 return new Future.sync(() {
683 for (Uri uri in disallowedLibraryUris) { 683 for (Uri uri in disallowedLibraryUris) {
684 if (loadedLibraries.containsLibrary(uri)) { 684 if (loadedLibraries.containsLibrary(uri)) {
685 Set<String> importChains = 685 Set<String> importChains =
686 computeImportChainsFor(loadedLibraries, Uri.parse('dart:io')); 686 computeImportChainsFor(loadedLibraries, uri);
687 reporter.reportInfo(NO_LOCATION_SPANNABLE, 687 reporter.reportInfo(NO_LOCATION_SPANNABLE,
688 MessageKind.DISALLOWED_LIBRARY_IMPORT, 688 MessageKind.DISALLOWED_LIBRARY_IMPORT,
689 {'uri': uri, 689 {'uri': uri,
690 'importChain': importChains.join( 690 'importChain': importChains.join(
691 MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)}); 691 MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)});
692 } 692 }
693 } 693 }
694 694
695 if (!loadedLibraries.containsLibrary(Uris.dart_core)) { 695 if (!loadedLibraries.containsLibrary(Uris.dart_core)) {
696 return null; 696 return null;
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 if (_otherDependencies == null) { 2045 if (_otherDependencies == null) {
2046 _otherDependencies = new Setlet<Element>(); 2046 _otherDependencies = new Setlet<Element>();
2047 } 2047 }
2048 _otherDependencies.add(element.implementation); 2048 _otherDependencies.add(element.implementation);
2049 } 2049 }
2050 2050
2051 Iterable<Element> get otherDependencies { 2051 Iterable<Element> get otherDependencies {
2052 return _otherDependencies != null ? _otherDependencies : const <Element>[]; 2052 return _otherDependencies != null ? _otherDependencies : const <Element>[];
2053 } 2053 }
2054 } 2054 }
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