Skip to content

Commit

Permalink
Reuse existing tab fallback (for Chrome headless)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jul 9, 2016
1 parent 466beff commit 27d3ed8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lighthouse-core/driver/drivers/cri.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CriDriver extends Driver {
/* eslint-disable new-cap */
chromeRemoteInterface.New((err, tab) => {
if (err) {
return reject(err);
log.warn('CRI driver', 'cannot create new tab, will reuse tab.', err);
}

chromeRemoteInterface({port: port, chooseTab: tab}, chrome => {
Expand All @@ -57,6 +57,7 @@ class CriDriver extends Driver {
disconnect() {
return new Promise((resolve, reject) => {
if (!this._tab) {
this._chrome.close();
return resolve();
}

Expand Down

0 comments on commit 27d3ed8

Please sign in to comment.