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 {
119
119
}
120
120
121
121
private removeSynchronization ( context : SynchronizationContext ) {
122
+ context . dispose ( ) ;
123
+
122
124
const documentKey = getUriPath ( context . projectedDocument . uri ) ;
123
125
const synchronizations = this . synchronizations [ documentKey ] ;
124
126
clearTimeout ( context . timeoutId ) ;
@@ -167,6 +169,11 @@ export class RazorDocumentSynchronizer {
167
169
reject ( reason ) ;
168
170
}
169
171
} ,
172
+ dispose : ( ) => {
173
+ while ( rejectionsForCancel . length > 0 ) {
174
+ rejectionsForCancel . pop ( ) ;
175
+ }
176
+ } ,
170
177
projectedDocumentSynchronized,
171
178
onProjectedDocumentSynchronized,
172
179
projectedTextDocumentSynchronized,
@@ -271,4 +278,5 @@ interface SynchronizationContext {
271
278
readonly projectedTextDocumentSynchronized : ( ) => void ;
272
279
readonly onProjectedTextDocumentSynchronized : Promise < void > ;
273
280
readonly cancel : ( reason : string ) => void ;
281
+ readonly dispose : ( ) => void ;
274
282
}
You can’t perform that action at this time.
0 commit comments