Skip to content
Snippets Groups Projects
Commit 4a114a5d authored by henry's avatar henry
Browse files

fixup! Lox integration

Bug 42489: Return copies of Lox module internals to ensure they cannot
be edited by a caller.
parent 2b7376cd
Branches
No related tags found
1 merge request!970Update Lox module
......@@ -526,7 +526,8 @@ class LoxImpl {
if (!this.#initialized) {
throw new LoxError(LoxErrors.NotInitialized);
}
return this.#invites;
// Return a copy.
return structuredClone(this.#invites);
}
/**
......@@ -578,7 +579,7 @@ class LoxImpl {
if (this.#invites.len > 50) {
this.#invites.shift();
}
return invite;
return structuredClone(invite);
}
}
......@@ -775,7 +776,8 @@ class LoxImpl {
);
return [];
}
return this.#events;
// Return a copy.
return structuredClone(this.#events);
}
/**
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment