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

Unified Diff: compiler/java/com/google/dart/compiler/common/SourceInfo.java

Issue 10704180: Use 'int' instead of Position. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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
Index: compiler/java/com/google/dart/compiler/common/SourceInfo.java
diff --git a/compiler/java/com/google/dart/compiler/common/SourceInfo.java b/compiler/java/com/google/dart/compiler/common/SourceInfo.java
index 44ead65065e7f2f85404a450561eafce957ba926..0ae843a1f10b3e6c1304e6749be820afda397548 100644
--- a/compiler/java/com/google/dart/compiler/common/SourceInfo.java
+++ b/compiler/java/com/google/dart/compiler/common/SourceInfo.java
@@ -161,6 +161,9 @@ public final class SourceInfo implements Serializable {
}
int getLineOffset(int line) {
+ if (line < 0) {
+ return 0;
+ }
return lineOffsets.get(line);
}

Powered by Google App Engine
This is Rietveld 408576698