| 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..9c47dff40ae8738ddd596d6d649354a339a20364 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.controlledClientInfo(client).then(this._onClientInfo.bind(this, clientLabelText));
|
| }
|
| }
|
|
|
| @@ -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);
|
| @@ -405,14 +404,7 @@ Resources.ServiceWorkersView.Section = class {
|
| element.createTextChild(targetInfo.url);
|
| var focusLabel = element.createChild('label', 'link');
|
| focusLabel.createTextChild('focus');
|
| - focusLabel.addEventListener('click', this._activateTarget.bind(this, targetInfo.targetId), true);
|
| - }
|
| -
|
| - /**
|
| - * @param {string} targetId
|
| - */
|
| - _activateTarget(targetId) {
|
| - this._manager.target().targetAgent().activateTarget(targetId);
|
| + focusLabel.addEventListener('click', () => this._manager.activateControlledClient(targetInfo.targetId), true);
|
| }
|
|
|
| _startButtonClicked() {
|
|
|