| 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 7998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8009 } | 8009 } |
| 8010 | 8010 |
| 8011 | 8011 |
| 8012 class VisitorAdapter : public i::ObjectVisitor { | 8012 class VisitorAdapter : public i::ObjectVisitor { |
| 8013 public: | 8013 public: |
| 8014 explicit VisitorAdapter(PersistentHandleVisitor* visitor) | 8014 explicit VisitorAdapter(PersistentHandleVisitor* visitor) |
| 8015 : visitor_(visitor) {} | 8015 : visitor_(visitor) {} |
| 8016 void VisitPointers(i::Object** start, i::Object** end) override { | 8016 void VisitPointers(i::Object** start, i::Object** end) override { |
| 8017 UNREACHABLE(); | 8017 UNREACHABLE(); |
| 8018 } | 8018 } |
| 8019 DISABLE_CFI_PERF |
| 8019 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { | 8020 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { |
| 8020 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); | 8021 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); |
| 8021 visitor_->VisitPersistentHandle( | 8022 visitor_->VisitPersistentHandle( |
| 8022 reinterpret_cast<Persistent<Value>*>(&value), class_id); | 8023 reinterpret_cast<Persistent<Value>*>(&value), class_id); |
| 8023 } | 8024 } |
| 8024 | 8025 |
| 8025 private: | 8026 private: |
| 8026 PersistentHandleVisitor* visitor_; | 8027 PersistentHandleVisitor* visitor_; |
| 8027 }; | 8028 }; |
| 8028 | 8029 |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9017 Address callback_address = | 9018 Address callback_address = |
| 9018 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9019 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9019 VMState<EXTERNAL> state(isolate); | 9020 VMState<EXTERNAL> state(isolate); |
| 9020 ExternalCallbackScope call_scope(isolate, callback_address); | 9021 ExternalCallbackScope call_scope(isolate, callback_address); |
| 9021 callback(info); | 9022 callback(info); |
| 9022 } | 9023 } |
| 9023 | 9024 |
| 9024 | 9025 |
| 9025 } // namespace internal | 9026 } // namespace internal |
| 9026 } // namespace v8 | 9027 } // namespace v8 |
| OLD | NEW |