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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinder.java

Issue 11414205: Fix for issue 6651 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinder.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinder.java (revision 15448)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinder.java (working copy)
@@ -88,11 +88,17 @@
if (htmlSource.startsWith(TAG_NAME_SCRIPT, index)) {
index += TAG_NAME_SCRIPT_LENGTH;
int endIndex = htmlSource.indexOf('>', index);
+ if (endIndex < 0) {
+ return;
+ }
boolean isDartScript = processScriptTagAttributes(htmlSource.substring(index, endIndex));
if (isDartScript && htmlSource.charAt(endIndex - 1) != '/') {
// If the script tag is well-formed, then it has a body that we also need to process.
endIndex++;
index = htmlSource.indexOf(TAG_END_SCRIPT, endIndex);
+ if (index < 0) {
+ return;
+ }
processScriptBody(htmlSource.substring(endIndex, index));
index += TAG_END_SCRIPT_LENGTH;
} else {
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinderTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698