From 42fc2ea450e7fd8efc30bbae6005933d9a1f2cc2 Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Tue, 24 Aug 2021 14:28:39 +0200 Subject: [PATCH] wip --- src/mono/wasm/runtime/binding_support.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/wasm/runtime/binding_support.js b/src/mono/wasm/runtime/binding_support.js index 771b76630c374..6bf971fb62e65 100644 --- a/src/mono/wasm/runtime/binding_support.js +++ b/src/mono/wasm/runtime/binding_support.js @@ -160,6 +160,7 @@ var BindingSupportLib = { return Promise.resolve(js_obj) === js_obj || ((typeof js_obj === "object" || typeof js_obj === "function") && typeof js_obj.then === "function") }; + this.isChromium = navigator && navigator.userAgent && navigator.userAgent.includes("Chrome"); this._empty_string = ""; this._empty_string_ptr = 0; @@ -2047,7 +2048,7 @@ var BindingSupportLib = { if (!obj) throw new Error("ERR09: Invalid JS object handle for '"+sName+"'"); - const prevent_timer_throttling = obj.constructor.name !== 'WebSocket' || !navigator.userAgent.includes("Chrome") + const prevent_timer_throttling = !BINDING.isChromium || obj.constructor.name !== 'WebSocket' ? null : () => MONO.prevent_timer_throttling(0);