FCohtmlScriptCompiler
Public Classes
Section titled “Public Classes”| Name | |
|---|---|
| struct | ScriptCompilerDeleter |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| FCohtmlScriptCompiler(FCohtmlSystemWrapperSharedPtr InExistingSystem) | |
| CohtmlCompiledScriptData | CompileScript(const FString & FilePath, TArray< uint8 > FileData =TArray< uint8 >(), bool IsModule =false) Compile a script for faster initial execution later. |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| FCriticalSection | ConcurrentCompileGuard |
| TUniquePtr< cohtml::ScriptCompiler, ScriptCompilerDeleter > | ScriptCompiler |
| FCohtmlSystemWrapperSharedPtr | ExistingSystem |
Public Functions Documentation
Section titled “Public Functions Documentation”function FCohtmlScriptCompiler
Section titled “function FCohtmlScriptCompiler”FCohtmlScriptCompiler( FCohtmlSystemWrapperSharedPtr InExistingSystem)function CompileScript
Section titled “function CompileScript”CohtmlCompiledScriptData CompileScript( const FString & FilePath, TArray< uint8 > FileData =TArray< uint8 >(), bool IsModule =false)Compile a script for faster initial execution later.
Parameters:
- FilePath - A relative (with respect to the working dir) or absolute path to a given JavaScript file.
- FileData - optional array with the contents of the file, which must be in UTF8. If FileData is provided, the FilePath will not be accessed/read.
- IsModule - whether the supplied script will be used as module or script. Wrong compile data will be rejected by V8. Should log warnings/errors on unsuccessful pre-compilation, file not found, or other similar errors that might arise.
Return: Structure with the compiled JS data and the file contents. If compilation is not successful, CohtmlCompiledScriptData::CompiledData will be nullptr.
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable ConcurrentCompileGuard
Section titled “variable ConcurrentCompileGuard”FCriticalSection ConcurrentCompileGuard;variable ScriptCompiler
Section titled “variable ScriptCompiler”TUniquePtr< cohtml::ScriptCompiler, ScriptCompilerDeleter > ScriptCompiler;variable ExistingSystem
Section titled “variable ExistingSystem”FCohtmlSystemWrapperSharedPtr ExistingSystem;© 2026 Coherent Labs. All rights reserved.