Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js

Issue 2903473002: DevTools: Promisify Target domain (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
index 725c84c3786da45fa9d9536fd0912e03e6a12a53..bf07b15f7650d235ded15e236c4e3991088120ab 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
@@ -287,7 +287,7 @@ Resources.ServiceWorkersView.Section = class {
this._updateClientInfo(
clientLabelText, /** @type {!Protocol.Target.TargetInfo} */ (this._clientInfoCache.get(client)));
}
- this._manager.target().targetAgent().getTargetInfo(client, this._onClientInfo.bind(this, clientLabelText));
+ this._manager.target().targetAgent().getTargetInfo(client).then(this._onClientInfo.bind(this, clientLabelText));
pfeldman 2017/05/23 19:10:25 You changed a random call site, but what does it a
}
}
@@ -382,11 +382,10 @@ Resources.ServiceWorkersView.Section = class {
/**
* @param {!Element} element
- * @param {?Protocol.Error} error
* @param {?Protocol.Target.TargetInfo} targetInfo
*/
- _onClientInfo(element, error, targetInfo) {
- if (error || !targetInfo)
+ _onClientInfo(element, targetInfo) {
+ if (!targetInfo)
return;
this._clientInfoCache.set(targetInfo.targetId, targetInfo);
this._updateClientInfo(element, targetInfo);

Powered by Google App Engine
This is Rietveld 408576698