| 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 7796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7807 options); | 7807 options); |
| 7808 } | 7808 } |
| 7809 | 7809 |
| 7810 | 7810 |
| 7811 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { | 7811 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { |
| 7812 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7812 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7813 isolate->heap()->VisitExternalResources(visitor); | 7813 isolate->heap()->VisitExternalResources(visitor); |
| 7814 } | 7814 } |
| 7815 | 7815 |
| 7816 | 7816 |
| 7817 bool Isolate::IsInUse() { |
| 7818 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7819 return isolate->IsInUse(); |
| 7820 } |
| 7821 |
| 7822 |
| 7817 class VisitorAdapter : public i::ObjectVisitor { | 7823 class VisitorAdapter : public i::ObjectVisitor { |
| 7818 public: | 7824 public: |
| 7819 explicit VisitorAdapter(PersistentHandleVisitor* visitor) | 7825 explicit VisitorAdapter(PersistentHandleVisitor* visitor) |
| 7820 : visitor_(visitor) {} | 7826 : visitor_(visitor) {} |
| 7821 void VisitPointers(i::Object** start, i::Object** end) override { | 7827 void VisitPointers(i::Object** start, i::Object** end) override { |
| 7822 UNREACHABLE(); | 7828 UNREACHABLE(); |
| 7823 } | 7829 } |
| 7824 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { | 7830 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { |
| 7825 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); | 7831 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); |
| 7826 visitor_->VisitPersistentHandle( | 7832 visitor_->VisitPersistentHandle( |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8828 Address callback_address = | 8834 Address callback_address = |
| 8829 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8835 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8830 VMState<EXTERNAL> state(isolate); | 8836 VMState<EXTERNAL> state(isolate); |
| 8831 ExternalCallbackScope call_scope(isolate, callback_address); | 8837 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8832 callback(info); | 8838 callback(info); |
| 8833 } | 8839 } |
| 8834 | 8840 |
| 8835 | 8841 |
| 8836 } // namespace internal | 8842 } // namespace internal |
| 8837 } // namespace v8 | 8843 } // namespace v8 |
| OLD | NEW |