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

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: More cleanup of ClassElement.cloneMembersTo 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 4cfc900ba86182c22cdb08833fec42a4c69fb127..1e0af70862c0f625c4bf1d3effb2361b5996a520 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);
@@ -765,10 +769,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