5#ifndef V8_SANDBOX_TRUSTED_POINTER_SCOPE_H_
6#define V8_SANDBOX_TRUSTED_POINTER_SCOPE_H_
12class DisallowJavascriptExecution;
14#ifdef V8_ENABLE_SANDBOX
16struct TrustedPointerTableEntry;
23class TrustedPointerPublishingScope {
26 const DisallowJavascriptExecution& no_js);
27 ~TrustedPointerPublishingScope();
33 void TrackPointer(TrustedPointerTableEntry* entry);
36 enum class State : uint8_t { kInProgress,
kSuccess, kFailure };
37 enum class Storage : uint8_t {
kEmpty, kSingleton, kVector };
39 State
state_{State::kInProgress};
43 TrustedPointerTableEntry* singleton_{
nullptr};
44 std::vector<TrustedPointerTableEntry*>*
vector_;
50class DisableTrustedPointerPublishingScope {
53 ~DisableTrustedPointerPublishingScope();
57 TrustedPointerPublishingScope* saved_{
nullptr};
65 const DisallowJavascriptExecution& no_js) {}
DisableTrustedPointerPublishingScope(Isolate *isolate)
TrustedPointerPublishingScope(Isolate *isolate, const DisallowJavascriptExecution &no_js)
enum v8::internal::@1270::DeoptimizableCodeIterator::@67 state_