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
SyntaxTreeDeserializer: Hold on to omitted nodes across multiple updates
RawSyntax.init(from: Decoder) looks up omitted nodes by id from a
WeakLookupTable, initializing itself as a copy. This copy is then used in the
new tree, but wasn't being written back to the lookup table, leaving it with a
weak reference to the original node. This was an issue because the
SyntaxTreeDeserializer only holds a strong reference to the most recent syntax
tree, meaning the orignal node (and table entry) could have been cleaned up,
even though further incremental updates could still refer to that id.
This patch changes RawSyntax.init(from: Decoder) to reuse the RawSyntax node
from the WeakLookupTable, rather than copying it.
Resolves rdar://problem/44877860
0 commit comments