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 7568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7579 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7579 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7580 return isolate->heap()->SetOptimizeForLatency(); | 7580 return isolate->heap()->SetOptimizeForLatency(); |
7581 } | 7581 } |
7582 | 7582 |
7583 | 7583 |
7584 void Isolate::IsolateInBackgroundNotification() { | 7584 void Isolate::IsolateInBackgroundNotification() { |
7585 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7585 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7586 return isolate->heap()->SetOptimizeForMemoryUsage(); | 7586 return isolate->heap()->SetOptimizeForMemoryUsage(); |
7587 } | 7587 } |
7588 | 7588 |
7589 void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { | |
7590 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
7591 return isolate->heap()->MemoryPressureNotification(level, | |
7592 Locker::IsLocked(this)); | |
jochen (gone - plz use gerrit)
2016/03/18 15:29:12
as explained offline, Locker::IsLocked() always re
ulan
2016/03/18 16:10:00
Done.
| |
7593 } | |
7589 | 7594 |
7590 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, | 7595 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, |
7591 JitCodeEventHandler event_handler) { | 7596 JitCodeEventHandler event_handler) { |
7592 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7597 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7593 // Ensure that logging is initialized for our isolate. | 7598 // Ensure that logging is initialized for our isolate. |
7594 isolate->InitializeLoggingAndCounters(); | 7599 isolate->InitializeLoggingAndCounters(); |
7595 isolate->logger()->SetCodeEventHandler(options, event_handler); | 7600 isolate->logger()->SetCodeEventHandler(options, event_handler); |
7596 } | 7601 } |
7597 | 7602 |
7598 | 7603 |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8685 Address callback_address = | 8690 Address callback_address = |
8686 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8691 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8687 VMState<EXTERNAL> state(isolate); | 8692 VMState<EXTERNAL> state(isolate); |
8688 ExternalCallbackScope call_scope(isolate, callback_address); | 8693 ExternalCallbackScope call_scope(isolate, callback_address); |
8689 callback(info); | 8694 callback(info); |
8690 } | 8695 } |
8691 | 8696 |
8692 | 8697 |
8693 } // namespace internal | 8698 } // namespace internal |
8694 } // namespace v8 | 8699 } // namespace v8 |
OLD | NEW |