#ifndef V8_SANDBOX_ISOLATE_INL_H_
#define V8_SANDBOX_ISOLATE_INL_H_
#include "src/execution/isolate.h"
#include "src/heap/heap-write-barrier-inl.h"
namespace v8 {
namespace internal {
template <typename IsolateT>
IsolateForSandbox::IsolateForSandbox(IsolateT* isolate)
#ifdef V8_ENABLE_SANDBOX
: isolate_(isolate->ForSandbox()) { … }
#else
{
}
#endif
#ifdef V8_ENABLE_SANDBOX
ExternalPointerTable& IsolateForSandbox::GetExternalPointerTableFor(
ExternalPointerTag tag) { … }
ExternalPointerTable::Space* IsolateForSandbox::GetExternalPointerTableSpaceFor(
ExternalPointerTag tag, Address host) { … }
ExternalBufferTable& IsolateForSandbox::GetExternalBufferTableFor(
ExternalBufferTag tag) { … }
ExternalBufferTable::Space* IsolateForSandbox::GetExternalBufferTableSpaceFor(
ExternalBufferTag tag, Address host) { … }
CodePointerTable::Space* IsolateForSandbox::GetCodePointerTableSpaceFor(
Address owning_slot) { … }
TrustedPointerTable& IsolateForSandbox::GetTrustedPointerTable() { … }
TrustedPointerTable::Space* IsolateForSandbox::GetTrustedPointerTableSpace() { … }
#endif
#ifdef V8_ENABLE_LEAPTIERING
JSDispatchTable::Space* IsolateForSandbox::GetJSDispatchTableSpaceFor(
Address owning_slot) {
DCHECK(!ReadOnlyHeap::Contains(owning_slot));
return isolate_->heap()->js_dispatch_table_space();
}
#endif
template <typename IsolateT>
IsolateForPointerCompression::IsolateForPointerCompression(IsolateT* isolate)
#ifdef V8_COMPRESS_POINTERS
: isolate_(isolate->ForSandbox()) { … }
#else
{
}
#endif
#ifdef V8_COMPRESS_POINTERS
ExternalPointerTable& IsolateForPointerCompression::GetExternalPointerTableFor(
ExternalPointerTag tag) { … }
ExternalPointerTable::Space*
IsolateForPointerCompression::GetExternalPointerTableSpaceFor(
ExternalPointerTag tag, Address host) { … }
CppHeapPointerTable& IsolateForPointerCompression::GetCppHeapPointerTable() { … }
CppHeapPointerTable::Space*
IsolateForPointerCompression::GetCppHeapPointerTableSpace() { … }
#endif
}
}
#endif