2020-12-03 17:48:45 +00:00
|
|
|
// Copyright 2020 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
import {LogEntry} from './log.mjs';
|
|
|
|
|
|
|
|
export class ApiLogEntry extends LogEntry {
|
2020-12-09 08:01:26 +00:00
|
|
|
constructor(type, time, name, argument) {
|
2020-12-03 17:48:45 +00:00
|
|
|
super(type, time);
|
|
|
|
this._name = name;
|
2020-12-09 08:01:26 +00:00
|
|
|
this._argument = argument;
|
|
|
|
}
|
|
|
|
|
|
|
|
get name() {
|
|
|
|
return this._name;
|
|
|
|
}
|
|
|
|
|
|
|
|
get argument() {
|
|
|
|
return this._argument;
|
2020-12-03 17:48:45 +00:00
|
|
|
}
|
2020-12-07 08:44:54 +00:00
|
|
|
|
2020-12-03 17:48:45 +00:00
|
|
|
toString() {
|
2020-12-07 08:44:54 +00:00
|
|
|
return `Api(${this.type})`;
|
|
|
|
}
|
|
|
|
|
|
|
|
toStringLong() {
|
2020-12-03 17:48:45 +00:00
|
|
|
return `Api(${this.type}): ${this._name}`;
|
|
|
|
}
|
2020-12-07 08:44:54 +00:00
|
|
|
|
|
|
|
static get propertyNames() {
|
2020-12-09 08:01:26 +00:00
|
|
|
return ['type', 'name', 'argument'];
|
2020-12-07 08:44:54 +00:00
|
|
|
}
|
2020-12-03 17:48:45 +00:00
|
|
|
}
|