DartEntryImpl dartCopy = dartEntry.getWritableCopy();
if (thrownException == null) {
dartCopy.setValueInLibrary(DartEntry.RESOLVED_UNIT, librarySource, task.getResolvedUnit());
cache.storedAst(unitSource);
} else {
dartCopy.recordResolutionErrorInLibrary(librarySource, thrownException);
cache.removedAst(unitSource);
}
cache.put(unitSource, dartCopy);
dartEntry = dartCopy;