Skip to content

Commit

Permalink
Merge pull request #1728 from GoogleChrome/152
Browse files Browse the repository at this point in the history
tag 1.5.2
  • Loading branch information
paulirish authored Feb 15, 2017
2 parents 3043cc3 + 609f4aa commit 936fbcd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion lighthouse-core/gather/connections/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class Connection {
const callback = this._callbacks.get(object.id);
this._callbacks.delete(object.id);

// handleRawError returns or throws synchronously; wrap to put into promise chain.
return callback.resolve(Promise.resolve().then(_ => {
if (object.error) {
log.formatProtocol('method <= browser ERR', {method: callback.method}, 'error');
Expand Down
14 changes: 5 additions & 9 deletions lighthouse-core/gather/connections/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,14 @@ class ExtensionConnection extends Connection {
// The error from the extension has a `message` property that is the
// stringified version of the actual protocol error object.
const message = chrome.runtime.lastError.message;
let error;
let errorMessage;
try {
error = JSON.parse(message);
errorMessage = JSON.parse(message).message;
} catch (e) {}
error = error || {message: 'Unknown debugger protocol error.'};
errorMessage = errorMessage || 'Unknown debugger protocol error.';

// handleRawError returns or throws synchronously, so try/catch awkwardly.
try {
return resolve(this.handleRawError(error, command));
} catch (err) {
return reject(err);
}
log.formatProtocol('method <= browser ERR', {method: command}, 'error');
return reject(new Error(`Protocol error (${command}): ${errorMessage}`));
}

log.formatProtocol('method <= browser OK', {method: command, params: result}, 'verbose');
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-extension/app/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "1.5.1",
"version": "1.5.2",
"minimum_chrome_version": "56",
"manifest_version": 2,
"description": "__MSG_appDescription__",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lighthouse",
"version": "1.5.1",
"version": "1.5.2",
"description": "Lighthouse",
"main": "./lighthouse-core/index.js",
"bin": {
Expand Down

0 comments on commit 936fbcd

Please sign in to comment.