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

Unified Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 1196193016: DevTools: [CSS] promisify CSS domain (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments 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
Index: Source/devtools/front_end/timeline/TimelineModel.js
diff --git a/Source/devtools/front_end/timeline/TimelineModel.js b/Source/devtools/front_end/timeline/TimelineModel.js
index c4563456c336ce8e71438d8adca4c90d073593b2..7d127c8fe7032fc85678017cc0eac7f7ef63d5bc 100644
--- a/Source/devtools/front_end/timeline/TimelineModel.js
+++ b/Source/devtools/front_end/timeline/TimelineModel.js
@@ -645,14 +645,15 @@ WebInspector.TimelineModel.prototype = {
_stopProfilingOnTarget: function(target)
{
/**
- * @param {?{profile: !ProfilerAgent.CPUProfile}} value
+ * @param {?Protocol.Error} error
+ * @param {?ProfilerAgent.CPUProfile} profile
* @return {?ProfilerAgent.CPUProfile}
*/
- function extractProfile(value)
+ function extractProfile(error, profile)
{
- return value && value.profile;
+ return !error && profile ? profile : null;
}
- return target.profilerAgent().stop().then(extractProfile).then(this._addCpuProfile.bind(this, target.id()));
+ return target.profilerAgent().stop(extractProfile).then(this._addCpuProfile.bind(this, target.id()));
},
/**
« no previous file with comments | « Source/devtools/front_end/sdk/InspectorBackend.js ('k') | Source/devtools/scripts/generate_protocol_externs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698