| 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 8124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8135 return Utils::IntegerToLocal(result); | 8135 return Utils::IntegerToLocal(result); |
| 8136 } | 8136 } |
| 8137 | 8137 |
| 8138 | 8138 |
| 8139 void Isolate::ReportExternalAllocationLimitReached() { | 8139 void Isolate::ReportExternalAllocationLimitReached() { |
| 8140 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); | 8140 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 8141 if (heap->gc_state() != i::Heap::NOT_IN_GC) return; | 8141 if (heap->gc_state() != i::Heap::NOT_IN_GC) return; |
| 8142 heap->ReportExternalMemoryPressure(); | 8142 heap->ReportExternalMemoryPressure(); |
| 8143 } | 8143 } |
| 8144 | 8144 |
| 8145 void Isolate::CheckMemoryPressure() { |
| 8146 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 8147 heap->CheckMemoryPressure(); |
| 8148 } |
| 8145 | 8149 |
| 8146 HeapProfiler* Isolate::GetHeapProfiler() { | 8150 HeapProfiler* Isolate::GetHeapProfiler() { |
| 8147 i::HeapProfiler* heap_profiler = | 8151 i::HeapProfiler* heap_profiler = |
| 8148 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); | 8152 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); |
| 8149 return reinterpret_cast<HeapProfiler*>(heap_profiler); | 8153 return reinterpret_cast<HeapProfiler*>(heap_profiler); |
| 8150 } | 8154 } |
| 8151 | 8155 |
| 8152 | 8156 |
| 8153 CpuProfiler* Isolate::GetCpuProfiler() { | 8157 CpuProfiler* Isolate::GetCpuProfiler() { |
| 8154 i::CpuProfiler* cpu_profiler = | 8158 i::CpuProfiler* cpu_profiler = |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10501 Address callback_address = | 10505 Address callback_address = |
| 10502 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10506 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10503 VMState<EXTERNAL> state(isolate); | 10507 VMState<EXTERNAL> state(isolate); |
| 10504 ExternalCallbackScope call_scope(isolate, callback_address); | 10508 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10505 callback(info); | 10509 callback(info); |
| 10506 } | 10510 } |
| 10507 | 10511 |
| 10508 | 10512 |
| 10509 } // namespace internal | 10513 } // namespace internal |
| 10510 } // namespace v8 | 10514 } // namespace v8 |
| OLD | NEW |