Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js |
| index 1d0373d15aa7972728638a074a871e2b03bf580e..801d1d48cd1359981a34d0dfba7a14043e037ee0 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js |
| @@ -39,8 +39,11 @@ WebInspector.ApplicationCacheModel = function(target) |
| this._agent = target.applicationCacheAgent(); |
| this._agent.enable(); |
| - target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, this._frameNavigated, this); |
| - target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this._frameDetached, this); |
| + var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target); |
|
pfeldman
2016/07/22 17:33:47
There should be no AppCacheModel when there is no
eostroukhov-old
2016/07/25 19:36:10
Done.
|
| + if (resourceTreeModel) { |
|
dgozman
2016/07/22 17:19:43
This model doesn't work without frames at all.
eostroukhov-old
2016/07/25 19:36:10
Done.
|
| + resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, this._frameNavigated, this); |
| + resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this._frameDetached, this); |
| + } |
| this._statuses = {}; |
| this._manifestURLsByFrame = {}; |