@@ -78177,12 +78177,11 @@ var ts;
7817778177 var bucket = getBucketForCompilationSettings(key, /*createIfMissing*/ true);
7817878178 var entry = bucket.get(path);
7817978179 if (!entry) {
78180- ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?");
7818178180 // Have never seen this file with these settings. Create a new source file for it.
7818278181 var sourceFile = ts.createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, /*setNodeParents*/ false, scriptKind);
7818378182 entry = {
7818478183 sourceFile: sourceFile,
78185- languageServiceRefCount: 0 ,
78184+ languageServiceRefCount: 1 ,
7818678185 owners: []
7818778186 };
7818878187 bucket.set(path, entry);
@@ -78194,14 +78193,14 @@ var ts;
7819478193 if (entry.sourceFile.version !== version) {
7819578194 entry.sourceFile = ts.updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
7819678195 }
78197- }
78198- // If we're acquiring, then this is the first time this LS is asking for this document.
78199- // Increase our ref count so we know there's another LS using the document. If we're
78200- // not acquiring, then that means the LS is 'updating' the file instead, and that means
78201- // it has already acquired the document previously. As such, we do not need to increase
78202- // the ref count.
78203- if (acquiring) {
78204- entry.languageServiceRefCount++;
78196+ // If we're acquiring, then this is the first time this LS is asking for this document.
78197+ // Increase our ref count so we know there's another LS using the document. If we're
78198+ // not acquiring, then that means the LS is 'updating' the file instead, and that means
78199+ // it has already acquired the document previously. As such, we do not need to increase
78200+ // the ref count.
78201+ if (acquiring) {
78202+ entry.languageServiceRefCount++;
78203+ }
7820578204 }
7820678205 return entry.sourceFile;
7820778206 }
0 commit comments