| 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 6724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6735 void Isolate::LowMemoryNotification() { | 6735 void Isolate::LowMemoryNotification() { |
| 6736 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6736 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6737 { | 6737 { |
| 6738 i::HistogramTimerScope idle_notification_scope( | 6738 i::HistogramTimerScope idle_notification_scope( |
| 6739 isolate->counters()->gc_low_memory_notification()); | 6739 isolate->counters()->gc_low_memory_notification()); |
| 6740 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); | 6740 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
| 6741 } | 6741 } |
| 6742 } | 6742 } |
| 6743 | 6743 |
| 6744 | 6744 |
| 6745 int Isolate::ContextDisposedNotification() { | 6745 int Isolate::ContextDisposedNotification(bool dependant_context) { |
| 6746 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6746 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6747 return isolate->heap()->NotifyContextDisposed(); | 6747 return isolate->heap()->NotifyContextDisposed(dependant_context); |
| 6748 } | 6748 } |
| 6749 | 6749 |
| 6750 | 6750 |
| 6751 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, | 6751 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, |
| 6752 JitCodeEventHandler event_handler) { | 6752 JitCodeEventHandler event_handler) { |
| 6753 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6753 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6754 // Ensure that logging is initialized for our isolate. | 6754 // Ensure that logging is initialized for our isolate. |
| 6755 isolate->InitializeLoggingAndCounters(); | 6755 isolate->InitializeLoggingAndCounters(); |
| 6756 isolate->logger()->SetCodeEventHandler(options, event_handler); | 6756 isolate->logger()->SetCodeEventHandler(options, event_handler); |
| 6757 } | 6757 } |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7760 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7760 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7761 Address callback_address = | 7761 Address callback_address = |
| 7762 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7762 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7763 VMState<EXTERNAL> state(isolate); | 7763 VMState<EXTERNAL> state(isolate); |
| 7764 ExternalCallbackScope call_scope(isolate, callback_address); | 7764 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7765 callback(info); | 7765 callback(info); |
| 7766 } | 7766 } |
| 7767 | 7767 |
| 7768 | 7768 |
| 7769 } } // namespace v8::internal | 7769 } } // namespace v8::internal |
| OLD | NEW |