| 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 7775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7786 options); | 7786 options); |
| 7787 } | 7787 } |
| 7788 | 7788 |
| 7789 | 7789 |
| 7790 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { | 7790 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { |
| 7791 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7791 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7792 isolate->heap()->VisitExternalResources(visitor); | 7792 isolate->heap()->VisitExternalResources(visitor); |
| 7793 } | 7793 } |
| 7794 | 7794 |
| 7795 | 7795 |
| 7796 bool Isolate::IsInUse() { |
| 7797 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7798 return isolate->IsInUse(); |
| 7799 } |
| 7800 |
| 7801 |
| 7796 class VisitorAdapter : public i::ObjectVisitor { | 7802 class VisitorAdapter : public i::ObjectVisitor { |
| 7797 public: | 7803 public: |
| 7798 explicit VisitorAdapter(PersistentHandleVisitor* visitor) | 7804 explicit VisitorAdapter(PersistentHandleVisitor* visitor) |
| 7799 : visitor_(visitor) {} | 7805 : visitor_(visitor) {} |
| 7800 void VisitPointers(i::Object** start, i::Object** end) override { | 7806 void VisitPointers(i::Object** start, i::Object** end) override { |
| 7801 UNREACHABLE(); | 7807 UNREACHABLE(); |
| 7802 } | 7808 } |
| 7803 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { | 7809 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { |
| 7804 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); | 7810 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); |
| 7805 visitor_->VisitPersistentHandle( | 7811 visitor_->VisitPersistentHandle( |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8810 Address callback_address = | 8816 Address callback_address = |
| 8811 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8817 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8812 VMState<EXTERNAL> state(isolate); | 8818 VMState<EXTERNAL> state(isolate); |
| 8813 ExternalCallbackScope call_scope(isolate, callback_address); | 8819 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8814 callback(info); | 8820 callback(info); |
| 8815 } | 8821 } |
| 8816 | 8822 |
| 8817 | 8823 |
| 8818 } // namespace internal | 8824 } // namespace internal |
| 8819 } // namespace v8 | 8825 } // namespace v8 |
| OLD | NEW |