File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ export class RazorDocumentSynchronizer {
119119 }
120120
121121 private removeSynchronization ( context : SynchronizationContext ) {
122+ context . dispose ( ) ;
123+
122124 const documentKey = getUriPath ( context . projectedDocument . uri ) ;
123125 const synchronizations = this . synchronizations [ documentKey ] ;
124126 clearTimeout ( context . timeoutId ) ;
@@ -167,6 +169,11 @@ export class RazorDocumentSynchronizer {
167169 reject ( reason ) ;
168170 }
169171 } ,
172+ dispose : ( ) => {
173+ while ( rejectionsForCancel . length > 0 ) {
174+ rejectionsForCancel . pop ( ) ;
175+ }
176+ } ,
170177 projectedDocumentSynchronized,
171178 onProjectedDocumentSynchronized,
172179 projectedTextDocumentSynchronized,
@@ -271,4 +278,5 @@ interface SynchronizationContext {
271278 readonly projectedTextDocumentSynchronized : ( ) => void ;
272279 readonly onProjectedTextDocumentSynchronized : Promise < void > ;
273280 readonly cancel : ( reason : string ) => void ;
281+ readonly dispose : ( ) => void ;
274282}
You can’t perform that action at this time.
0 commit comments