#include "third_party/blink/renderer/bindings/core/v8/script_cache_consumer.h"
#include <atomic>
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/common/trace_event_common.h"
#include "third_party/blink/renderer/bindings/core/v8/script_cache_consumer_client.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_code_cache.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/loader/resource/script_resource.h"
#include "third_party/blink/renderer/core/script/classic_script.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/heap/cross_thread_persistent.h"
#include "third_party/blink/renderer/platform/loader/fetch/cached_metadata.h"
#include "third_party/blink/renderer/platform/loader/fetch/url_loader/cached_metadata_handler.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/scheduler/public/worker_pool.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "v8/include/v8.h"
namespace blink {
ScriptCacheConsumer::ScriptCacheConsumer(
v8::Isolate* isolate,
scoped_refptr<CachedMetadata> cached_metadata,
const String& script_url_string,
uint64_t script_resource_identifier)
: … { … }
ScriptCacheConsumer::ScriptCacheConsumer(
v8::Isolate* isolate,
scoped_refptr<CachedMetadata> cached_metadata,
std::unique_ptr<v8::ScriptCompiler::ConsumeCodeCacheTask>
completed_consume_task,
const String& script_url_string,
uint64_t script_resource_identifier)
: … { … }
ScriptCacheConsumer::State ScriptCacheConsumer::AdvanceState(
State new_state_bit) { … }
void ScriptCacheConsumer::RunTaskOffThread() { … }
void ScriptCacheConsumer::PostFinishCallbackTask() { … }
void ScriptCacheConsumer::RunMergeTaskOffThread() { … }
void ScriptCacheConsumer::Trace(Visitor* visitor) const { … }
void ScriptCacheConsumer::NotifyClientWaiting(
ScriptCacheConsumerClient* client,
ClassicScript* classic_script,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { … }
void ScriptCacheConsumer::CallFinishCallback() { … }
}