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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java

Issue 10066047: Fix for issue 2569 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/java/com/google/dart/compiler/UrlLibrarySource.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java (revision 6614)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java (working copy)
@@ -127,6 +127,9 @@
@Override
public LibrarySource getImportFor(String relPath) throws IOException {
+ if (relPath == null || relPath.isEmpty()) {
+ return null;
+ }
return new UrlLibrarySource(getUri().resolve(relPath).normalize(), systemLibraryManager);
}
@@ -142,7 +145,7 @@
@Override
public DartSource getSourceFor(String relPath) {
- if (relPath != null) {
+ if (relPath != null && !relPath.isEmpty()) {
if (relPath.equals(dartSrc.getName())) {
return dartSrc;
}
@@ -193,8 +196,8 @@
/**
* @see #warmUpCompiler()
*/
- public static void warmUpCompiler(
- CachingArtifactProvider rootProvider, DartCompilerListener listener) {
+ public static void warmUpCompiler(CachingArtifactProvider rootProvider,
+ DartCompilerListener listener) {
EditorLibraryManager sysLibMgr = SystemLibraryManagerProvider.getSystemLibraryManager();
String warmupSrcCode = "main() {print('success');}";
@@ -207,7 +210,7 @@
try {
CompilerConfiguration config = new DefaultCompilerConfiguration(options, sysLibMgr) {
- @Override
+ @Override
public CompilerMetrics getCompilerMetrics() {
return metrics;
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/UrlLibrarySource.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698