Skip to content

Commit 29094d7

Browse files
committed
Handle Console.messageRepeatCountUpdated event
1 parent 5973262 commit 29094d7

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

webkit/webKitDebugAdapter.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class WebKitDebugAdapter implements IDebugAdapter {
4343
private appRoot: string;
4444
private platform: string;
4545
private isAttached: boolean;
46+
private _lastOutputEvent: OutputEvent;
4647

4748
public constructor() {
4849
this._variableHandles = new Handles<IScopeVarHandle>();
@@ -161,6 +162,7 @@ export class WebKitDebugAdapter implements IDebugAdapter {
161162
connection.on('Debugger.globalObjectCleared', () => this.onGlobalObjectCleared());
162163
connection.on('Debugger.breakpointResolved', params => this.onBreakpointResolved(params));
163164
connection.on('Console.messageAdded', params => this.onConsoleMessage(params));
165+
connection.on('Console.messageRepeatCountUpdated', params => this.onMessageRepeatCountUpdated(params));
164166
connection.on('Inspector.detached', () => this.terminateSession());
165167
connection.on('close', () => this.terminateSession());
166168
connection.on('error', () => this.terminateSession());
@@ -312,9 +314,15 @@ export class WebKitDebugAdapter implements IDebugAdapter {
312314

313315
const formattedMessage = formatConsoleMessage(localMessage, isClientPath);
314316
if (formattedMessage) {
315-
this.fireEvent(new OutputEvent(
316-
formattedMessage.text + '\n',
317-
formattedMessage.isError ? 'stderr' : 'stdout'));
317+
let outputEvent: OutputEvent = new OutputEvent(formattedMessage.text + '\n', formattedMessage.isError ? 'stderr' : 'stdout');
318+
this._lastOutputEvent = outputEvent;
319+
this.fireEvent(outputEvent);
320+
}
321+
}
322+
323+
public onMessageRepeatCountUpdated(params: WebKitProtocol.Console.MessageRepeatCountUpdatedEventArgs) {
324+
if (this._lastOutputEvent) {
325+
this.fireEvent(this._lastOutputEvent);
318326
}
319327
}
320328

webkit/webKitProtocol.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ declare namespace WebKitProtocol {
234234
message: Message;
235235
}
236236

237+
interface MessageRepeatCountUpdatedEventArgs {
238+
count: number;
239+
}
240+
237241
interface Message {
238242
line?: number;
239243
column?: number;

0 commit comments

Comments
 (0)