The engine-thread half of a runtime inspector, as ScriptedUiSession drives it. More...
#include <script_inspector_port.hpp>
Public Types | |
| using | EvaluationDeadline = std::chrono::steady_clock::time_point |
Public Member Functions | |
| virtual | ~ScriptInspectorPort () |
| virtual void | set_realm_capabilities (const CapabilitySet &) |
| Tell the port which native capabilities the realm it is about to be attached to holds. | |
| virtual void | attach (ScriptEngine *engine)=0 |
| Point the port at engine, or at none with nullptr. | |
| virtual void | detach ()=0 |
| Release the engine; a blocked off-thread request wakes as detached. | |
| virtual bool | pump ()=0 |
| Run at most one queued request. True when it changed realm state. | |
| virtual void | set_post_evaluation_reset (std::function< std::string(EvaluationDeadline)> reset)=0 |
| Install the realm reset a completed evaluation owes. | |
| virtual std::string | run_pending_post_evaluation_reset ()=0 |
| Run the owed reset if one is pending. | |
The engine-thread half of a runtime inspector, as ScriptedUiSession drives it.
The session attaches the port to its live engine across reloads, pumps it once per poll(), and discharges the realm reset a completed evaluation owes. What the port does with the engine (off-thread Runtime.evaluate, interrupt) is the implementation's business; Pulp's implementation is ScriptInspectorBridge.
Every method is called on the session's engine thread.
| using pulp::view::ScriptInspectorPort::EvaluationDeadline = std::chrono::steady_clock::time_point |
|
virtual |
|
pure virtual |
Point the port at engine, or at none with nullptr.
Implemented in pulp::view::ScriptInspectorBridge.
|
pure virtual |
Release the engine; a blocked off-thread request wakes as detached.
Implemented in pulp::view::ScriptInspectorBridge.
|
pure virtual |
Run at most one queued request. True when it changed realm state.
Implemented in pulp::view::ScriptInspectorBridge.
|
pure virtual |
Run the owed reset if one is pending.
Returns its error text, empty on success or when nothing was owed.
Implemented in pulp::view::ScriptInspectorBridge.
|
pure virtual |
Install the realm reset a completed evaluation owes.
The session installs it once, before the first attach().
Implemented in pulp::view::ScriptInspectorBridge.
|
inlinevirtual |
Tell the port which native capabilities the realm it is about to be attached to holds.
The session calls this before every attach() so an evaluator can refuse a realm whose explicit grant carries an effectful capability. The default keeps a port that does not evaluate unchanged.
Reimplemented in pulp::view::ScriptInspectorBridge.