From 521cb4ca9b9b02f7ba3150338d5f3c4b035aab8d Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 9 Mar 2023 13:09:40 +0900 Subject: [PATCH] fix(rumtime): Add `Deno.` prefix for registered symbols (#18086) --- ext/web/02_event.js | 2 +- runtime/js/30_os.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/web/02_event.js b/ext/web/02_event.js index dd8b4f57b9..f354bf1828 100644 --- a/ext/web/02_event.js +++ b/ext/web/02_event.js @@ -1062,7 +1062,7 @@ class EventTarget { // This prevents the recursive dispatches of unload events. // See https://github.com/denoland/deno/issues/9201. if (event.type === "unload" && self === globalThis_) { - globalThis_[SymbolFor("isUnloadDispatched")] = true; + globalThis_[SymbolFor("Deno.isUnloadDispatched")] = true; } const { listeners } = self[eventTargetData]; diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js index 76325cfffe..3af5803ad6 100644 --- a/runtime/js/30_os.js +++ b/runtime/js/30_os.js @@ -61,7 +61,7 @@ function exit(code) { } // Dispatches `unload` only when it's not dispatched yet. - if (!globalThis[SymbolFor("isUnloadDispatched")]) { + if (!globalThis[SymbolFor("Deno.isUnloadDispatched")]) { // Invokes the `unload` hooks before exiting // ref: https://github.com/denoland/deno/issues/3603 windowDispatchEvent(new Event("unload"));