Skip to content
Snippets Groups Projects
Commit 677dab92 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! Lox integration

Bug 42489: Return copies of Lox module internals to ensure they cannot
be edited by a caller.
parent fb56536d
Branches
Tags
1 merge request!980Bug 42512: Rebased alpha onto Firefox 115.10.0esr
......@@ -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