| 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 7668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7679 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7679 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7680 return isolate->heap()->SetOptimizeForMemoryUsage(); | 7680 return isolate->heap()->SetOptimizeForMemoryUsage(); |
| 7681 } | 7681 } |
| 7682 | 7682 |
| 7683 void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { | 7683 void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { |
| 7684 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7684 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7685 return isolate->heap()->MemoryPressureNotification(level, | 7685 return isolate->heap()->MemoryPressureNotification(level, |
| 7686 Locker::IsLocked(this)); | 7686 Locker::IsLocked(this)); |
| 7687 } | 7687 } |
| 7688 | 7688 |
| 7689 void Isolate::SetRAILMode(RAILMode rail_mode) { |
| 7690 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7691 return isolate->SetRAILMode(rail_mode); |
| 7692 } |
| 7693 |
| 7689 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, | 7694 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, |
| 7690 JitCodeEventHandler event_handler) { | 7695 JitCodeEventHandler event_handler) { |
| 7691 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7696 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7692 // Ensure that logging is initialized for our isolate. | 7697 // Ensure that logging is initialized for our isolate. |
| 7693 isolate->InitializeLoggingAndCounters(); | 7698 isolate->InitializeLoggingAndCounters(); |
| 7694 isolate->logger()->SetCodeEventHandler(options, event_handler); | 7699 isolate->logger()->SetCodeEventHandler(options, event_handler); |
| 7695 } | 7700 } |
| 7696 | 7701 |
| 7697 | 7702 |
| 7698 void Isolate::SetStackLimit(uintptr_t stack_limit) { | 7703 void Isolate::SetStackLimit(uintptr_t stack_limit) { |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8803 Address callback_address = | 8808 Address callback_address = |
| 8804 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8809 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8805 VMState<EXTERNAL> state(isolate); | 8810 VMState<EXTERNAL> state(isolate); |
| 8806 ExternalCallbackScope call_scope(isolate, callback_address); | 8811 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8807 callback(info); | 8812 callback(info); |
| 8808 } | 8813 } |
| 8809 | 8814 |
| 8810 | 8815 |
| 8811 } // namespace internal | 8816 } // namespace internal |
| 8812 } // namespace v8 | 8817 } // namespace v8 |
| OLD | NEW |