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

Unified Diff: Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 1219313002: DevTools: support targets that don't have Resource agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/ResourceTreeModel.js
diff --git a/Source/devtools/front_end/sdk/ResourceTreeModel.js b/Source/devtools/front_end/sdk/ResourceTreeModel.js
index 1d10f696138da4c7133c3fa53ef305cf3974b2ca..2d8ac60e027992b880c753bbcfa195c0b3908980 100644
--- a/Source/devtools/front_end/sdk/ResourceTreeModel.js
+++ b/Source/devtools/front_end/sdk/ResourceTreeModel.js
@@ -107,20 +107,17 @@ WebInspector.ResourceTreeModel.prototype = {
{
/** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */
this._frames = {};
-
- if (this.target().isDedicatedWorker()) {
- this._cachedResourcesProcessed = true;
- return;
- }
-
- delete this._cachedResourcesProcessed;
+ this._cachedResourcesProcessed = false;
this._agent.getResourceTree(this._processCachedResources.bind(this));
},
_processCachedResources: function(error, mainFramePayload)
{
if (error) {
- console.error(JSON.stringify(error));
+ // FIXME: support targets that don't have resourceTreeModel.
pfeldman 2015/07/02 17:28:07 This clearly breaks something :)
yurys 2015/07/02 21:21:26 All the tests are passing and it works fine on usu
+ if (this.target().isPage() || this.target().isServiceWorker())
+ console.error(JSON.stringify(error));
+ this._cachedResourcesProcessed = true;
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698