An isolated JavaScript interpreter instance.
Synopsis
Declared in <mrdocs/Engines/JavaScript/Context.hpp>
class Context;
Description
Each Context owns an independent JerryScript interpreter with its own heap, reserved lazily up to 4 GB, so a script can keep every symbol of a large corpus alive. Multiple Contexts can exist simultaneously, allowing parallel JavaScript execution across threads (each thread should use its own Context).
To execute scripts or create values, construct a Scope from the Context. The Scope activates the Context on the current thread and provides methods for script evaluation and value creation.
Contexts can be copied (via copy constructor); copies share the same underlying interpreter and heap. This is useful for passing context references without transferring ownership.
Types
Name |
Description |
Shared runtime data for a JavaScript context. |
Member Functions
Name |
Description |
|
Constructors |
|
Destructor. |
|
Copy assignment (deleted). |
Friends
Name |
Description |
A JavaScript scope for value lifetime management. |
|
An ECMAScript value. |
See Also
Scope
Created with MrDocs