Index: src/platform-macos.cc |
diff --git a/src/platform-macos.cc b/src/platform-macos.cc |
index 30e2b890bb75faee074808802b2e9ae3eac59ed0..fde5217a78ddd7fac4ff8a52937b423fca8a8c98 100644 |
--- a/src/platform-macos.cc |
+++ b/src/platform-macos.cc |
@@ -818,9 +818,8 @@ class SamplerThread : public Thread { |
void SampleContext(Sampler* sampler) { |
thread_act_t profiled_thread = sampler->platform_data()->profiled_thread(); |
- Isolate* isolate = sampler->isolate(); |
TickSample sample_obj; |
- TickSample* sample = isolate->cpu_profiler()->TickSampleEvent(); |
+ TickSample* sample = CpuProfiler::TickSampleEvent(sampler->isolate()); |
if (sample == NULL) sample = &sample_obj; |
if (KERN_SUCCESS != thread_suspend(profiled_thread)) return; |
@@ -851,7 +850,7 @@ class SamplerThread : public Thread { |
flavor, |
reinterpret_cast<natural_t*>(&state), |
&count) == KERN_SUCCESS) { |
- sample->state = isolate->current_vm_state(); |
+ sample->state = sampler->isolate()->current_vm_state(); |
sample->pc = reinterpret_cast<Address>(state.REGISTER_FIELD(ip)); |
sample->sp = reinterpret_cast<Address>(state.REGISTER_FIELD(sp)); |
sample->fp = reinterpret_cast<Address>(state.REGISTER_FIELD(bp)); |