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

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

Issue 2296363002: DevTools: Do not run CPU profiler on targets with no JS capability. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2840
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 d7ca7c8b726dea720632991c3986066bf2b09eca..6b62e90e3360e5d35dad0ca80d125c85d91208c3 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
@@ -109,7 +109,7 @@ WebInspector.TimelineController.prototype = {
*/
_startProfilingOnTarget: function(target)
{
- return target.profilerAgent().start();
+ return target.hasJSCapability() ? target.profilerAgent().start() : Promise.resolve();
},
/**
@@ -129,7 +129,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