chromium/extensions/renderer/worker_script_context_set.cc

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

#include "extensions/renderer/worker_script_context_set.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/ranges/algorithm.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/worker_thread_util.h"
#include "third_party/abseil-cpp/absl/base/attributes.h"
#include "v8/include/v8-context.h"

namespace extensions {

namespace {

ContextVector;

// Returns an iterator to the ScriptContext associated with |v8_context| from
// |contexts|, or |contexts|->end() if not found.
ContextVector::iterator FindContext(ContextVector* contexts,
                                    v8::Local<v8::Context> v8_context) {}

// Implement thread safety by storing each ScriptContext in TLS.
ABSL_CONST_INIT thread_local ContextVector* contexts =;

}  // namespace

WorkerScriptContextSet::WorkerScriptContextSet() = default;

WorkerScriptContextSet::~WorkerScriptContextSet() = default;

void WorkerScriptContextSet::ForEach(
    const mojom::HostID& host_id,
    content::RenderFrame* render_frame,
    const base::RepeatingCallback<void(ScriptContext*)>& callback) {}

void WorkerScriptContextSet::ExecuteCallbackWithContext(
    ScriptContext* context,
    const base::RepeatingCallback<void(ScriptContext*)>& callback) {}

void WorkerScriptContextSet::Insert(std::unique_ptr<ScriptContext> context) {}

ScriptContext* WorkerScriptContextSet::GetContextByV8Context(
    v8::Local<v8::Context> v8_context) {}

void WorkerScriptContextSet::Remove(v8::Local<v8::Context> v8_context,
                                    const GURL& url) {}

void WorkerScriptContextSet::WillStopCurrentWorkerThread() {}

}  // namespace extensions