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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js

Issue 2297813002: DevTools: Do not run CPU profiler on targets with no JS capability. (Closed)
Patch Set: Created 4 years, 4 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: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
index 8a943494d9a49ab5a20e4831dc6cbe8d1fa4b07e..eeb468e9e0eee65797346da267bfbfab2ccfdd58 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
@@ -110,7 +110,7 @@ WebInspector.TimelineController.prototype = {
*/
_startProfilingOnTarget: function(target)
{
- return target.profilerAgent().start();
+ return target.hasJSCapability() ? target.profilerAgent().start() : Promise.resolve();
},
/**
@@ -130,7 +130,7 @@ WebInspector.TimelineController.prototype = {
*/
_stopProfilingOnTarget: function(target)
{
- return target.profilerAgent().stop(this._addCpuProfile.bind(this, target.id()));
+ return target.hasJSCapability() ? target.profilerAgent().stop(this._addCpuProfile.bind(this, target.id())) : Promise.resolve();
},
/**
« 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