Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
v8::ScriptCompiler::ConsumeCodeCacheTask Class Referencefinal

#include <v8-script.h>

Public Member Functions

 ~ConsumeCodeCacheTask ()
 
void Run ()
 
void SourceTextAvailable (Isolate *isolate, Local< String > source_text, const ScriptOrigin &origin)
 
bool ShouldMergeWithExistingScript () const
 
void MergeWithExistingScript ()
 

Friends

class ScriptCompiler
 

Detailed Description

A task which the embedder must run on a background thread to consume a V8 code cache. Returned by ScriptCompiler::StartConsumingCodeCache.

Constructor & Destructor Documentation

◆ ~ConsumeCodeCacheTask()

v8::ScriptCompiler::ConsumeCodeCacheTask::~ConsumeCodeCacheTask ( )

Member Function Documentation

◆ MergeWithExistingScript()

void v8::ScriptCompiler::ConsumeCodeCacheTask::MergeWithExistingScript ( )

Merges newly deserialized data into an existing script which was found during SourceTextAvailable. May be called only after Run() has completed. Can execute on any thread, like Run().

◆ Run()

void v8::ScriptCompiler::ConsumeCodeCacheTask::Run ( )

◆ ShouldMergeWithExistingScript()

bool v8::ScriptCompiler::ConsumeCodeCacheTask::ShouldMergeWithExistingScript ( ) const

Returns whether the embedder should call MergeWithExistingScript. This function may be called from any thread, any number of times, but its return value is only meaningful after SourceTextAvailable has completed.

◆ SourceTextAvailable()

void v8::ScriptCompiler::ConsumeCodeCacheTask::SourceTextAvailable ( Isolate isolate,
Local< String source_text,
const ScriptOrigin origin 
)

Provides the source text string and origin information to the consumption task. May be called before, during, or after Run(). This step checks whether the script matches an existing script in the Isolate's compilation cache. To check whether such a script was found, call ShouldMergeWithExistingScript.

The Isolate provided must be the same one used during StartConsumingCodeCache and must be currently entered on the thread that calls this function. The source text and origin provided in this step must precisely match those used later in the ScriptCompiler::Source that will contain this ConsumeCodeCacheTask.

Friends And Related Function Documentation

◆ ScriptCompiler

friend class ScriptCompiler
friend

The documentation for this class was generated from the following file: