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 7840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7851 | 7851 |
7852 | 7852 |
7853 int Isolate::ContextDisposedNotification(bool dependant_context) { | 7853 int Isolate::ContextDisposedNotification(bool dependant_context) { |
7854 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7854 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7855 return isolate->heap()->NotifyContextDisposed(dependant_context); | 7855 return isolate->heap()->NotifyContextDisposed(dependant_context); |
7856 } | 7856 } |
7857 | 7857 |
7858 | 7858 |
7859 void Isolate::IsolateInForegroundNotification() { | 7859 void Isolate::IsolateInForegroundNotification() { |
7860 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7860 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7861 return isolate->heap()->SetOptimizeForLatency(); | 7861 return isolate->IsolateInForegroundNotification(); |
7862 } | 7862 } |
7863 | 7863 |
7864 | 7864 |
7865 void Isolate::IsolateInBackgroundNotification() { | 7865 void Isolate::IsolateInBackgroundNotification() { |
7866 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7866 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7867 return isolate->heap()->SetOptimizeForMemoryUsage(); | 7867 return isolate->IsolateInBackgroundNotification(); |
7868 } | 7868 } |
7869 | 7869 |
7870 void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { | 7870 void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { |
7871 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7871 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7872 return isolate->heap()->MemoryPressureNotification(level, | 7872 return isolate->heap()->MemoryPressureNotification(level, |
7873 Locker::IsLocked(this)); | 7873 Locker::IsLocked(this)); |
7874 } | 7874 } |
7875 | 7875 |
7876 void Isolate::SetRAILMode(RAILMode rail_mode) { | 7876 void Isolate::SetRAILMode(RAILMode rail_mode) { |
7877 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7877 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8999 Address callback_address = | 8999 Address callback_address = |
9000 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9000 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9001 VMState<EXTERNAL> state(isolate); | 9001 VMState<EXTERNAL> state(isolate); |
9002 ExternalCallbackScope call_scope(isolate, callback_address); | 9002 ExternalCallbackScope call_scope(isolate, callback_address); |
9003 callback(info); | 9003 callback(info); |
9004 } | 9004 } |
9005 | 9005 |
9006 | 9006 |
9007 } // namespace internal | 9007 } // namespace internal |
9008 } // namespace v8 | 9008 } // namespace v8 |
OLD | NEW |