| 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 9725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9736 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots(); | 9736 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots(); |
| 9737 } | 9737 } |
| 9738 | 9738 |
| 9739 | 9739 |
| 9740 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, | 9740 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, |
| 9741 WrapperInfoCallback callback) { | 9741 WrapperInfoCallback callback) { |
| 9742 reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id, | 9742 reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id, |
| 9743 callback); | 9743 callback); |
| 9744 } | 9744 } |
| 9745 | 9745 |
| 9746 void HeapProfiler::SetGetRetainerInfosCallback( |
| 9747 GetRetainerInfosCallback callback) { |
| 9748 reinterpret_cast<i::HeapProfiler*>(this)->SetGetRetainerInfosCallback( |
| 9749 callback); |
| 9750 } |
| 9746 | 9751 |
| 9747 size_t HeapProfiler::GetProfilerMemorySize() { | 9752 size_t HeapProfiler::GetProfilerMemorySize() { |
| 9748 return reinterpret_cast<i::HeapProfiler*>(this)-> | 9753 return reinterpret_cast<i::HeapProfiler*>(this)-> |
| 9749 GetMemorySizeUsedByProfiler(); | 9754 GetMemorySizeUsedByProfiler(); |
| 9750 } | 9755 } |
| 9751 | 9756 |
| 9752 | 9757 |
| 9753 void HeapProfiler::SetRetainedObjectInfo(UniqueId id, | 9758 void HeapProfiler::SetRetainedObjectInfo(UniqueId id, |
| 9754 RetainedObjectInfo* info) { | 9759 RetainedObjectInfo* info) { |
| 9755 reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info); | 9760 reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9996 Address callback_address = | 10001 Address callback_address = |
| 9997 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10002 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9998 VMState<EXTERNAL> state(isolate); | 10003 VMState<EXTERNAL> state(isolate); |
| 9999 ExternalCallbackScope call_scope(isolate, callback_address); | 10004 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10000 callback(info); | 10005 callback(info); |
| 10001 } | 10006 } |
| 10002 | 10007 |
| 10003 | 10008 |
| 10004 } // namespace internal | 10009 } // namespace internal |
| 10005 } // namespace v8 | 10010 } // namespace v8 |
| OLD | NEW |