You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to have a contract that the AST structure passed in to DartCompilerListener.unitCompiled(DartUnit) will not subsequently be modified because clients (such as Editor) need to be able to count on the structure remaining stable. This is currently not the case, which is causing a ConcurrentModificationException to be thrown while attempting to index the structure.
I found one place where the structure can be modified after it is passed to clients: the method com.google.dart.compiler.backend.js.Normalizer.NormalizerVisitor.Let.visitClass(DartClass) adds a node for the implicit default constructor (assuming there is one) to the list of members in a class. There might be other places, but I decided not to try to track them down. The only other place I found where the DartClass.members list might be modified is through the method DartClass.traverse(DartVisitor, DartContext), which implies that the list can be modified by visitors, but I didn't try to trace through all of the visitors to see whether the list is actually modified by any of them. I didn't even look at other lists (this is the one that caused the exception).
The text was updated successfully, but these errors were encountered:
We need to have a contract that the AST structure passed in to DartCompilerListener.unitCompiled(DartUnit) will not subsequently be modified because clients (such as Editor) need to be able to count on the structure remaining stable. This is currently not the case, which is causing a ConcurrentModificationException to be thrown while attempting to index the structure.
I found one place where the structure can be modified after it is passed to clients: the method com.google.dart.compiler.backend.js.Normalizer.NormalizerVisitor.Let.visitClass(DartClass) adds a node for the implicit default constructor (assuming there is one) to the list of members in a class. There might be other places, but I decided not to try to track them down. The only other place I found where the DartClass.members list might be modified is through the method DartClass.traverse(DartVisitor, DartContext), which implies that the list can be modified by visitors, but I didn't try to trace through all of the visitors to see whether the list is actually modified by any of them. I didn't even look at other lists (this is the one that caused the exception).
The text was updated successfully, but these errors were encountered: