Skip to content

Commit

Permalink
fix(rumtime): Add Deno. prefix for registered symbols (#18086)
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken authored Mar 9, 2023
1 parent 4e8edaf commit 521cb4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/web/02_event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion runtime/js/30_os.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 521cb4c

Please sign in to comment.