mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
check breakpoint validity; fixes #42478
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user