summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-26 21:10:31 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-26 21:10:31 +0200
commita05046a4d26d9b743b7f2333e9584a147623ca2b (patch)
treed255ebf8d5c5e037faf1d20a62d3815c5c3a9787
parente240469e7241fece5c00b398007b6c529301de6d (diff)
downloaduxp-a05046a4d26d9b743b7f2333e9584a147623ca2b.tar.gz
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
-rw-r--r--toolkit/modules/Troubleshoot.jsm13
1 files changed, 8 insertions, 5 deletions
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index 20aad67705..4c6ac558df 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -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;