1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

fix(rumtime): Add Deno. prefix for registered symbols (#18086)

This commit is contained in:
Kenta Moriuchi 2023-03-09 13:09:40 +09:00 committed by GitHub
parent 4e8edafb39
commit 521cb4ca9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1062,7 +1062,7 @@ class EventTarget {
// This prevents the recursive dispatches of unload events. // This prevents the recursive dispatches of unload events.
// See https://github.com/denoland/deno/issues/9201. // See https://github.com/denoland/deno/issues/9201.
if (event.type === "unload" && self === globalThis_) { if (event.type === "unload" && self === globalThis_) {
globalThis_[SymbolFor("isUnloadDispatched")] = true; globalThis_[SymbolFor("Deno.isUnloadDispatched")] = true;
} }
const { listeners } = self[eventTargetData]; const { listeners } = self[eventTargetData];

View file

@ -61,7 +61,7 @@ function exit(code) {
} }
// Dispatches `unload` only when it's not dispatched yet. // Dispatches `unload` only when it's not dispatched yet.
if (!globalThis[SymbolFor("isUnloadDispatched")]) { if (!globalThis[SymbolFor("Deno.isUnloadDispatched")]) {
// Invokes the `unload` hooks before exiting // Invokes the `unload` hooks before exiting
// ref: https://github.com/denoland/deno/issues/3603 // ref: https://github.com/denoland/deno/issues/3603
windowDispatchEvent(new Event("unload")); windowDispatchEvent(new Event("unload"));