if ('WorkerGlobalScope' in self ||
    self.location.protocol === 'https:' ||
    'deviceMemory' in navigator) {
    proxyGetter(navigator, 'deviceMemory', () => args.memory, true);
}
if ('WorkerGlobalScope' in self || self.location.protocol === 'https:' || 'memory' in performance) {
    proxyGetter(performance.memory, 'jsHeapSizeLimit', () => args.maxHeapSize, true);
    if ('memory' in console) {
        proxyGetter(console.memory, 'jsHeapSizeLimit', () => args.maxHeapSize, true);
    }
}
