chromium/third_party/blink/renderer/bindings/core/v8/shadow_realm_context.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/bindings/core/v8/shadow_realm_context.h"

#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/shadow_realm/shadow_realm_global_scope.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_dom_wrapper.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_context_data.h"
#include "third_party/blink/renderer/platform/context_lifecycle_observer.h"
#include "v8/include/v8-context.h"

namespace blink {

namespace {

// This is a helper class to make the initiator ExecutionContext the owner
// of a ShadowRealmGlobalScope and its ScriptState. When the initiator
// ExecutionContext is destroyed, the ShadowRealmGlobalScope is destroyed,
// too.
class ShadowRealmLifetimeController
    : public GarbageCollected<ShadowRealmLifetimeController>,
      public ContextLifecycleObserver {};

}  // namespace

v8::MaybeLocal<v8::Context> OnCreateShadowRealmV8Context(
    v8::Local<v8::Context> initiator_context) {}

}  // namespace blink