From df13b8ffd199223881daf9231cdd63ec6f6b716f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 18 Jun 2015 11:43:16 -0700 Subject: [PATCH] Update comment. --- src/compiler/checker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3fd917bc00e..0fcc478d2b1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11684,6 +11684,9 @@ namespace ts { var cancellationToken: CancellationTokenObject; function getDiagnostics(sourceFile: SourceFile, ct: CancellationTokenObject): Diagnostic[] { try { + // Record the cancellation token so it can be checked later on during checkSourceElement. + // Do this in a finally block so we can ensure that it gets reset back to nothing after + // this call is done. cancellationToken = ct; return getDiagnosticsWorker(sourceFile); }