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

Unified Diff: dart/lib/compiler/implementation/compiler.dart

Issue 10855125: Ensure supertypes are loaded safely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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: dart/lib/compiler/implementation/compiler.dart
diff --git a/dart/lib/compiler/implementation/compiler.dart b/dart/lib/compiler/implementation/compiler.dart
index 69234fe7f8c32557ec96fb69ee1ee7501d6430ed..81be0024c8fed44b5bbd4dd42d9e8501b26b5c76 100644
--- a/dart/lib/compiler/implementation/compiler.dart
+++ b/dart/lib/compiler/implementation/compiler.dart
@@ -148,6 +148,8 @@ class Compiler implements DiagnosticListener {
bool compilationFailed = false;
+ bool hasCrashed = false;
+
Compiler([this.tracer = const Tracer(),
this.enableTypeAssertions = false,
this.enableUserAssertions = false,
@@ -203,6 +205,8 @@ class Compiler implements DiagnosticListener {
}
void unhandledExceptionOnElement(Element element) {
+ if (hasCrashed) return;
+ hasCrashed = true;
reportDiagnostic(spanFromElement(element),
MessageKind.COMPILER_CRASHED.error().toString(),
api.Diagnostic.CRASH);
@@ -763,10 +767,6 @@ class Compiler implements DiagnosticListener {
enqueuer.codegen.registerInstantiatedClass(cls);
}
- void resolveClass(ClassElement element) {
- withCurrentElement(element, () => resolver.resolveClass(element));
- }
-
Type resolveTypeAnnotation(Element element, TypeAnnotation annotation) {
return resolver.resolveTypeAnnotation(element, annotation);
}

Powered by Google App Engine
This is Rietveld 408576698