Index: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js b/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js |
index 41c7f04aaa0d149b3572ae6c6a6ccea5229fe191..2114d0a901dcd41c108736e022792ce86044b44f 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js |
@@ -189,16 +189,16 @@ Profiler.CPUProfileType = class extends Profiler.ProfileType { |
} |
startRecordingProfile() { |
- var target = UI.context.flavor(SDK.Target); |
- if (this.profileBeingRecorded() || !target) |
+ var cpuProfilerModel = UI.context.flavor(SDK.CPUProfilerModel); |
+ if (this.profileBeingRecorded() || !cpuProfilerModel) |
return; |
- var profile = new Profiler.CPUProfileHeader(target, this); |
+ var profile = new Profiler.CPUProfileHeader(cpuProfilerModel.target(), this); |
this.setProfileBeingRecorded(profile); |
SDK.targetManager.suspendAllTargets(); |
this.addProfile(profile); |
profile.updateStatus(Common.UIString('Recording\u2026')); |
this._recording = true; |
- target.cpuProfilerModel.startRecording(); |
+ cpuProfilerModel.startRecording(); |
} |
stopRecordingProfile() { |
@@ -231,7 +231,8 @@ Profiler.CPUProfileType = class extends Profiler.ProfileType { |
this.profileBeingRecorded() |
.target() |
alph
2017/02/28 23:59:13
nit: I'd rather write the synchronous part in a si
dgozman
2017/03/01 00:18:41
That's what I did, but formatter thinks differentl
|
- .cpuProfilerModel.stopRecording() |
+ .model(SDK.CPUProfilerModel) |
+ .stopRecording() |
.then(didStopProfiling.bind(this)) |
.then(SDK.targetManager.resumeAllTargets.bind(SDK.targetManager)) |
.then(fireEvent.bind(this)); |