Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ILSpy/TextView/DecompilerTabPageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,13 @@ async Task DecompileAsync()
ICSharpCode.ILSpy.AppEnv.AppLog.Mark($"DecompileAsync #{callNumber}: {rendered.Length} chars, {(output.Foldings?.Count ?? 0)} foldings, {(output.References?.Count ?? 0)} refs");
using (ICSharpCode.ILSpy.AppEnv.AppLog.Phase($"DecompileAsync #{callNumber}: Dispatcher.InvokeAsync (apply Text + props, triggers ApplyDocument)"))
await Dispatcher.UIThread.InvokeAsync(() => {
// Re-check on the UI thread, not just before rendering: collecting the text
// and waiting for this callback both take time, and a cancel that lands in
// that window (the assembly was removed from the list, the user selected
// something else) must not let the finished output overwrite whatever state
// the tab has been put into since.
if (cts.Token.IsCancellationRequested)
return;
Title = cachedBaseTitle;
ApplyOutput(output, effectiveSyntaxExtension, rendered);
});
Expand Down
Loading