fix(tracing): start without options (#4388)

This commit is contained in:
Andrey Lushnikov
2019-05-09 17:15:33 -07:00
committed by GitHub
parent 9a2fb2a0d4
commit ef24c69c62
3 changed files with 11 additions and 5 deletions

View File

@@ -31,9 +31,9 @@ class Tracing {
}
/**
* @param {!{path: string, screenshots?: boolean, categories?: !Array<string>}} options
* @param {!{path?: string, screenshots?: boolean, categories?: !Array<string>}} options
*/
async start(options) {
async start(options = {}) {
assert(!this._recording, 'Cannot start recording trace while already recording trace.');
const defaultCategories = [
@@ -75,7 +75,7 @@ class Tracing {
/**
* @param {string} handle
* @param {string} path
* @param {?string} path
*/
async _readStream(handle, path) {
let eof = false;