summaryrefslogtreecommitdiff
path: root/core/ops.rs
diff options
context:
space:
mode:
authorAndreu Botella <andreu@andreubotella.com>2022-12-26 08:00:13 -0800
committerGitHub <noreply@github.com>2022-12-26 17:00:13 +0100
commita67fd3e23e6965ce0bf25e19e5467bc5cc538d23 (patch)
tree20400dc55064ec8135c8109a3ce9c770d7927883 /core/ops.rs
parent1a3665b612c001dc93d4ddd1ed78eebcbbc898a9 (diff)
chore(core): Make `OpCtx` instances be realm-specific (#17174)
Diffstat (limited to 'core/ops.rs')
-rw-r--r--core/ops.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ops.rs b/core/ops.rs
index 8694324ad..65b511532 100644
--- a/core/ops.rs
+++ b/core/ops.rs
@@ -153,8 +153,10 @@ pub fn to_op_result<R: Serialize + 'static>(
pub struct OpCtx {
pub id: OpId,
pub state: Rc<RefCell<OpState>>,
- pub decl: OpDecl,
+ pub decl: Rc<OpDecl>,
pub runtime_state: Weak<RefCell<JsRuntimeState>>,
+ // Index of the current realm into `JsRuntimeState::known_realms`.
+ pub realm_idx: usize,
}
/// Maintains the resources and ops inside a JS runtime.