wasm/js: fix invalid restartCount reference

The `restartCount` variable on line 245 is mutating
global scope. The PR makes it consistent with the
rest ob the code (`self.restartCount`).

It was observed when importing the qtloader in a
typical Webpack/Babel build environment.

Change-Id: I338285f4f6bcb80df0c16d80cc3ebfec944a8be7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Avindra Goolcharan 2020-12-04 22:33:07 -05:00
parent 9d51fb579b
commit 1ee2558b23

View File

@ -242,7 +242,7 @@ function QtLoader(config)
publicAPI.setFontDpi = setFontDpi;
publicAPI.fontDpi = fontDpi;
restartCount = 0;
self.restartCount = 0;
function fetchResource(filePath) {
var fullPath = config.path + filePath;