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 7152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7163 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false); | 7163 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false); |
7164 } | 7164 } |
7165 | 7165 |
7166 | 7166 |
7167 void V8::AddGCEpilogueCallback(GCCallback callback, GCType gc_type) { | 7167 void V8::AddGCEpilogueCallback(GCCallback callback, GCType gc_type) { |
7168 i::Isolate* isolate = i::Isolate::Current(); | 7168 i::Isolate* isolate = i::Isolate::Current(); |
7169 isolate->heap()->AddGCEpilogueCallback( | 7169 isolate->heap()->AddGCEpilogueCallback( |
7170 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false); | 7170 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false); |
7171 } | 7171 } |
7172 | 7172 |
| 7173 void Isolate::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { |
| 7174 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7175 isolate->heap()->SetEmbedderHeapTracer(tracer); |
| 7176 } |
7173 | 7177 |
7174 void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback, | 7178 void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback, |
7175 ObjectSpace space, | 7179 ObjectSpace space, |
7176 AllocationAction action) { | 7180 AllocationAction action) { |
7177 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7181 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7178 isolate->memory_allocator()->AddMemoryAllocationCallback( | 7182 isolate->memory_allocator()->AddMemoryAllocationCallback( |
7179 callback, space, action); | 7183 callback, space, action); |
7180 } | 7184 } |
7181 | 7185 |
7182 | 7186 |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8752 Address callback_address = | 8756 Address callback_address = |
8753 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8757 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8754 VMState<EXTERNAL> state(isolate); | 8758 VMState<EXTERNAL> state(isolate); |
8755 ExternalCallbackScope call_scope(isolate, callback_address); | 8759 ExternalCallbackScope call_scope(isolate, callback_address); |
8756 callback(info); | 8760 callback(info); |
8757 } | 8761 } |
8758 | 8762 |
8759 | 8763 |
8760 } // namespace internal | 8764 } // namespace internal |
8761 } // namespace v8 | 8765 } // namespace v8 |
OLD | NEW |