Remove code to support browsers that don't have MessageChannel

Jasmine hasn't actually run in any such browsers since 2.x.
This commit is contained in:
Steve Gravrock
2025-11-12 21:53:29 -08:00
parent 9c2ffae2f9
commit bdf63f2402
5 changed files with 53 additions and 219 deletions

View File

@@ -10829,12 +10829,10 @@ getJasmineRequireObj().StackClearer = function(j$) {
// Unlike browsers, Node doesn't require us to do a periodic setTimeout
// so we avoid the overhead.
return nodeQueueMicrotaskImpl(global);
} else if (SAFARI_OR_WIN_WEBKIT || !global.MessageChannel /* tests */) {
} else if (SAFARI_OR_WIN_WEBKIT) {
// queueMicrotask is dramatically faster than MessageChannel in Safari
// and other WebKit-based browsers, such as the one distributed by Playwright
// to test Safari-like behavior on Windows.
// Some of our own integration tests provide a mock queueMicrotask in all
// environments because it's simpler to mock than MessageChannel.
return browserQueueMicrotaskImpl(global);
} else {
// MessageChannel is faster than queueMicrotask in supported browsers