From 263e0b899f1593203295a7e42c0bda4cd9a5ba95 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 26 Apr 2023 19:10:15 +1000 Subject: [PATCH] wasm: Fix permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trying to get a tracks list on a MediaStream without setting the src will generate an error in the callback and muck up the permissions handling. Pick-to: 6.5 Fixes: QTBUG-112901 Change-Id: Ide3a7336597fd0a08764e303dcc8f58755ba915d Reviewed-by: MikoĊ‚aj Boc --- src/corelib/kernel/qpermissions_wasm.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/corelib/kernel/qpermissions_wasm.cpp b/src/corelib/kernel/qpermissions_wasm.cpp index 175fc89dd0..7e885a4382 100644 --- a/src/corelib/kernel/qpermissions_wasm.cpp +++ b/src/corelib/kernel/qpermissions_wasm.cpp @@ -133,9 +133,6 @@ namespace qstdweb::PromiseCallbacks queryCallbacks; queryCallbacks.thenFunc = [device, cb](val mediaStream) { - val tracks = mediaStream.call("getTracks"); - if (!tracks.isUndefined() && !tracks.isNull()) - tracks[0].call("stop"); updatePermission(device, wapiGranted, cb); }; queryCallbacks.catchFunc = [device, cb](val error)