mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Fix throws an error if "winUtils.supportsHardwareH264Decoding" not available
After "Restart normally" - throws an error: Troubleshoot data provider failed: graphics [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMWindowUtils.supportsHardwareH264Decoding]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/Troubleshoot.jsm :: graphics :: line 348" data: no] Troubleshoot.jsm:155 TypeError: invalid 'in' operand data aboutSupport.js:204:1
This commit is contained in:
parent
c2d6003d64
commit
235d0f518f
1 changed files with 8 additions and 5 deletions
|
|
@ -347,11 +347,14 @@ var dataProviders = {
|
|||
QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils)
|
||||
data.supportsHardwareH264 = "Unknown";
|
||||
let promise = winUtils.supportsHardwareH264Decoding;
|
||||
promise.then(function(v) {
|
||||
data.supportsHardwareH264 = v;
|
||||
});
|
||||
promises.push(promise);
|
||||
try {
|
||||
// After restart - data may not be available
|
||||
let promise = winUtils.supportsHardwareH264Decoding;
|
||||
promise.then(function(v) {
|
||||
data.supportsHardwareH264 = v;
|
||||
});
|
||||
promises.push(promise);
|
||||
} catch (e) {}
|
||||
|
||||
data.currentAudioBackend = winUtils.currentAudioBackend;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue