Skip to content

Commit

Permalink
Cherry-pick PR microsoft#33141 into release-3.6
Browse files Browse the repository at this point in the history
Component commits:
206de25 Ensure that TS can run in a browser by checking for a process obj before using it in the perf logger

45227ee Merge branch 'master' into allow_running_in_web
  • Loading branch information
andrewbranch authored and typescript-bot committed Sep 4, 2019
1 parent 49b910e commit 8c7fed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/perfLogger.ts
Expand Up @@ -38,6 +38,6 @@ namespace ts {

/** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */
export const perfLogger: PerfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger;

perfLogger.logInfoEvent(`Starting TypeScript v${versionMajorMinor} with command line: ${JSON.stringify(process.argv)}`);
const args = typeof process === "undefined" ? [] : process.argv;
perfLogger.logInfoEvent(`Starting TypeScript v${versionMajorMinor} with command line: ${JSON.stringify(args)}`);
}

0 comments on commit 8c7fed6

Please sign in to comment.