From 7e2f7fd802cd27077f6bbe48a17b297cd97ec901 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 1 Feb 2018 01:10:35 +0100 Subject: [PATCH] check breakpoint validity; fixes #42478 --- src/vs/workbench/api/node/extHostTypes.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index d4afa18100a..add62e87399 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1603,6 +1603,9 @@ export class SourceBreakpoint extends Breakpoint { constructor(location: Location, enabled?: boolean, condition?: string, hitCondition?: string) { super(enabled, condition, hitCondition); + if (location === null) { + throw illegalArgument('location'); + } this.location = location; } } @@ -1612,6 +1615,9 @@ export class FunctionBreakpoint extends Breakpoint { constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string) { super(enabled, condition, hitCondition); + if (!functionName) { + throw illegalArgument('functionName'); + } this.functionName = functionName; } }