Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| index a458ab19f198bd24d4a974c94461682a68729bf3..012b5a81962c5fa4079e8622cad879bc5a6a7c82 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| @@ -52,12 +52,14 @@ WebInspector.AppManifestView.prototype = { |
| */ |
| targetAdded: function(target) |
| { |
| - if (this._target) |
| + if (this._resourceTreeModel) |
| return; |
| - this._target = target; |
| - |
| - this._updateManifest(); |
| - WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._updateManifest, this); |
| + var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target); |
| + if (resourceTreeModel) { |
|
dgozman
2016/07/22 03:27:02
Let's observe DOM capability and assert here inste
eostroukhov-old
2016/07/22 23:27:43
Done.
|
| + this._resourceTreeModel = resourceTreeModel; |
| + this._updateManifest(); |
| + resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._updateManifest, this); |
| + } |
| }, |
| /** |
| @@ -70,7 +72,8 @@ WebInspector.AppManifestView.prototype = { |
| _updateManifest: function() |
| { |
| - this._target.resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this)); |
| + if (this._resourceTreeModel) |
|
dgozman
2016/07/22 03:27:02
Judging by previous code, this method is never cal
eostroukhov-old
2016/07/22 23:27:43
Done.
|
| + this._resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this)); |
| }, |
| /** |