#include <v8-script.h>
A task which the embedder must run on a background thread to consume a V8 code cache. Returned by ScriptCompiler::StartConsumingCodeCache.
◆ ~ConsumeCodeCacheTask()
v8::ScriptCompiler::ConsumeCodeCacheTask::~ConsumeCodeCacheTask |
( |
| ) |
|
◆ 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()
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.
◆ ScriptCompiler
The documentation for this class was generated from the following file: