diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-01-27 13:36:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 13:36:36 +0100 |
commit | 884143218fad0e18f7553aaf079d52de703f7601 (patch) | |
tree | 9b9e9d30ea647041438ef8fa974b8d4234cabf73 /ext/timers/01_timers.js | |
parent | dcf8f144ab0516936bfa4e93357d71f1732d880e (diff) |
refactor: update runtime code for primordial checks for "instanceof" (#13497)
Diffstat (limited to 'ext/timers/01_timers.js')
-rw-r--r-- | ext/timers/01_timers.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/timers/01_timers.js b/ext/timers/01_timers.js index 6ef2e6654..caa490e61 100644 --- a/ext/timers/01_timers.js +++ b/ext/timers/01_timers.js @@ -16,6 +16,7 @@ // deno-lint-ignore camelcase NumberPOSITIVE_INFINITY, PromisePrototypeThen, + ObjectPrototypeIsPrototypeOf, SymbolFor, TypeError, } = window.__bootstrap.primordials; @@ -287,7 +288,7 @@ } }, (err) => { - if (err instanceof core.Interrupted) { + if (ObjectPrototypeIsPrototypeOf(core.InterruptedPrototype, err)) { // The timer was cancelled. removeFromScheduledTimers(timerObject); } else { |