| 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 6303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6314 SetAddHistogramSampleFunction(callback); | 6314 SetAddHistogramSampleFunction(callback); |
| 6315 } | 6315 } |
| 6316 | 6316 |
| 6317 void V8::SetFailedAccessCheckCallbackFunction( | 6317 void V8::SetFailedAccessCheckCallbackFunction( |
| 6318 FailedAccessCheckCallback callback) { | 6318 FailedAccessCheckCallback callback) { |
| 6319 i::Isolate* isolate = i::Isolate::Current(); | 6319 i::Isolate* isolate = i::Isolate::Current(); |
| 6320 isolate->SetFailedAccessCheckCallback(callback); | 6320 isolate->SetFailedAccessCheckCallback(callback); |
| 6321 } | 6321 } |
| 6322 | 6322 |
| 6323 | 6323 |
| 6324 int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( | 6324 int64_t Isolate::SlowAdjustAmountOfExternalAllocatedMemory( |
| 6325 int64_t change_in_bytes) { | 6325 int64_t change_in_bytes) { |
| 6326 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); | 6326 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 6327 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); | 6327 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); |
| 6328 } | 6328 } |
| 6329 | 6329 |
| 6330 | 6330 |
| 6331 HeapProfiler* Isolate::GetHeapProfiler() { | 6331 HeapProfiler* Isolate::GetHeapProfiler() { |
| 6332 i::HeapProfiler* heap_profiler = | 6332 i::HeapProfiler* heap_profiler = |
| 6333 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); | 6333 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); |
| 6334 return reinterpret_cast<HeapProfiler*>(heap_profiler); | 6334 return reinterpret_cast<HeapProfiler*>(heap_profiler); |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7593 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7593 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7594 Address callback_address = | 7594 Address callback_address = |
| 7595 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7595 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7596 VMState<EXTERNAL> state(isolate); | 7596 VMState<EXTERNAL> state(isolate); |
| 7597 ExternalCallbackScope call_scope(isolate, callback_address); | 7597 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7598 callback(info); | 7598 callback(info); |
| 7599 } | 7599 } |
| 7600 | 7600 |
| 7601 | 7601 |
| 7602 } } // namespace v8::internal | 7602 } } // namespace v8::internal |
| OLD | NEW |