OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 6693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6704 void Isolate::GetStackSample(const RegisterState& state, void** frames, | 6704 void Isolate::GetStackSample(const RegisterState& state, void** frames, |
6705 size_t frames_limit, SampleInfo* sample_info) { | 6705 size_t frames_limit, SampleInfo* sample_info) { |
6706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6707 i::TickSample::GetStackSample(isolate, state, frames, frames_limit, | 6707 i::TickSample::GetStackSample(isolate, state, frames, frames_limit, |
6708 sample_info); | 6708 sample_info); |
6709 } | 6709 } |
6710 | 6710 |
6711 | 6711 |
6712 void Isolate::SetEventLogger(LogEventCallback that) { | 6712 void Isolate::SetEventLogger(LogEventCallback that) { |
6713 // Do not overwrite the event logger if we want to log explicitly. | 6713 // Do not overwrite the event logger if we want to log explicitly. |
6714 if (i::FLAG_log_timer_events) return; | 6714 if (i::FLAG_log_internal_timer_events) return; |
6715 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6715 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6716 isolate->set_event_logger(that); | 6716 isolate->set_event_logger(that); |
6717 } | 6717 } |
6718 | 6718 |
6719 | 6719 |
6720 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { | 6720 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { |
6721 if (callback == NULL) return; | 6721 if (callback == NULL) return; |
6722 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6722 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6723 isolate->AddCallCompletedCallback(callback); | 6723 isolate->AddCallCompletedCallback(callback); |
6724 } | 6724 } |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7693 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7693 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7694 Address callback_address = | 7694 Address callback_address = |
7695 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7695 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7696 VMState<EXTERNAL> state(isolate); | 7696 VMState<EXTERNAL> state(isolate); |
7697 ExternalCallbackScope call_scope(isolate, callback_address); | 7697 ExternalCallbackScope call_scope(isolate, callback_address); |
7698 callback(info); | 7698 callback(info); |
7699 } | 7699 } |
7700 | 7700 |
7701 | 7701 |
7702 } } // namespace v8::internal | 7702 } } // namespace v8::internal |
OLD | NEW |