dcp-client 4.2.29 → 4.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -125,8 +125,8 @@ function evalScriptInSandbox(filename, sandbox)
|
|
|
125
125
|
*/
|
|
126
126
|
function evalFileInIIFE(filename, sandbox)
|
|
127
127
|
{
|
|
128
|
-
const prologue = '(function __dynamic_evalFile__IIFE(' + Object.keys(sandbox).join(',') + '){ return '
|
|
129
|
-
const epilogue = '});';
|
|
128
|
+
const prologue = '(function __dynamic_evalFile__IIFE(' + Object.keys(sandbox).join(',') + '){ return ';
|
|
129
|
+
const epilogue = '\n});';
|
|
130
130
|
const options = { filename, lineNumber: 0 };
|
|
131
131
|
|
|
132
132
|
debug('dcp-client:evalFileInIIFE')('evaluating', filename);
|
|
@@ -537,9 +537,12 @@ async function addConfigRKey(existing, hive, keyTail) {
|
|
|
537
537
|
if (os.platform() !== 'win32')
|
|
538
538
|
return;
|
|
539
539
|
neo = await require('./windows-registry').getObject(hive, keyTail);
|
|
540
|
-
debug('dcp-client:config')(` * Loading configuration from ${hive} ${keyTail}
|
|
541
|
-
if (
|
|
542
|
-
|
|
540
|
+
debug('dcp-client:config')(` * Loading configuration from ${hive} ${keyTail}`, neo);
|
|
541
|
+
if (neo)
|
|
542
|
+
{
|
|
543
|
+
coerceMagicRegProps(neo); // mutates `neo` in place
|
|
544
|
+
addConfig(existing, neo);
|
|
545
|
+
}
|
|
543
546
|
}
|
|
544
547
|
|
|
545
548
|
/** Merge a new configuration object on top of an existing one, via
|
|
@@ -774,7 +774,7 @@ self.wrapScriptLoading({ scriptName: 'access-lists', ringTransition: true }, fun
|
|
|
774
774
|
global.requestAnimationFrame = callback => setTimeout(callback, 0);
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
-
if (
|
|
777
|
+
if (protectedStorage.hasWebglSupport()) {
|
|
778
778
|
|
|
779
779
|
// This deals with Firefox bug 1529995, which causes the tab to crash if fenceSync is called.
|
|
780
780
|
if (navigator.userAgent.indexOf('Firefox') >= 0) {
|
|
@@ -20,7 +20,22 @@ self.wrapScriptLoading({ scriptName: 'gpu-timers' }, function gpuTimers$fn(prote
|
|
|
20
20
|
return 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @returns {boolean}
|
|
25
|
+
*/
|
|
26
|
+
protectedStorage.hasWebglSupport = function webglSupport() {
|
|
27
|
+
try
|
|
28
|
+
{
|
|
29
|
+
const canvas = new OffscreenCanvas(1,1);
|
|
30
|
+
return Boolean(canvas.getContext('webgl') || canvas.getContext('webgl2'));
|
|
31
|
+
}
|
|
32
|
+
catch
|
|
33
|
+
{
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
if (protectedStorage.hasWebglSupport())
|
|
24
39
|
{
|
|
25
40
|
let time = 0;
|
|
26
41
|
function getAndResetWebGLTimer()
|