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

Side by Side Diff: lib/compiler/implementation/apiimpl.dart

Issue 10629002: Avoid passing a null uri to translateUri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« 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('leg_apiimpl'); 5 #library('leg_apiimpl');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../compiler.dart', prefix: 'api'); 9 #import('../compiler.dart', prefix: 'api');
10 #import('leg.dart', prefix: 'leg'); 10 #import('leg.dart', prefix: 'leg');
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 bool run(Uri uri) { 90 bool run(Uri uri) {
91 bool success = super.run(uri); 91 bool success = super.run(uri);
92 for (final task in tasks) { 92 for (final task in tasks) {
93 log('${task.name} took ${task.timing}msec'); 93 log('${task.name} took ${task.timing}msec');
94 } 94 }
95 return success; 95 return success;
96 } 96 }
97 97
98 void reportDiagnostic(leg.SourceSpan span, String message, bool fatal) { 98 void reportDiagnostic(leg.SourceSpan span, String message, bool fatal) {
99 if (span === null) { 99 if (span === null || span.uri === null) {
ahe 2012/06/22 08:49:33 I would rather avoid creating source spans with ur
Johnni Winther 2012/06/22 11:40:55 Done.
100 handler(null, null, null, message, fatal); 100 handler(null, null, null, message, fatal);
101 } else { 101 } else {
102 handler(translateUri(span.uri, null), span.begin, span.end, 102 handler(translateUri(span.uri, null), span.begin, span.end,
103 message, fatal); 103 message, fatal);
104 } 104 }
105 } 105 }
106 106
107 bool get isMockCompilation() { 107 bool get isMockCompilation() {
108 return mockableLibraryUsed 108 return mockableLibraryUsed
109 && (options.indexOf('--allow-mock-compilation') !== -1); 109 && (options.indexOf('--allow-mock-compilation') !== -1);
110 } 110 }
111 } 111 }
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