chore: upgrade deno_core (#22782)

This commit is contained in:
Bartek Iwańczuk 2024-03-07 23:06:28 +00:00 committed by GitHub
parent 914b7495a8
commit 2d5b19277b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 7 deletions

View file

@ -763,6 +763,12 @@ function bootstrapMainRuntime(runtimeOptions) {
delete Object.prototype.__proto__;
}
if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.temporal)) {
// Removes the `Temporal` API.
delete globalThis.Temporal;
delete globalThis.Date.prototype.toTemporalInstant;
}
// Setup `Deno` global - we're actually overriding already existing global
// `Deno` with `Deno` namespace from "./deno.ts".
ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs));
@ -875,6 +881,12 @@ function bootstrapWorkerRuntime(
delete Object.prototype.__proto__;
}
if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.temporal)) {
// Removes the `Temporal` API.
delete globalThis.Temporal;
delete globalThis.Date.prototype.toTemporalInstant;
}
ObjectDefineProperties(finalDenoNs, {
pid: core.propGetterOnly(opPid),
noColor: core.propGetterOnly(() => op_bootstrap_no_color()),