Improved memory management in NPM/puppeteer driver

main
Elbert Alias 5 years ago
parent edbc553b45
commit d18b928dc4

@ -46,9 +46,15 @@ class PuppeteerBrowser extends Browser {
}
async visit(url) {
let browser;
try {
const browser = await this.browser();
browser = await this.browser();
} catch (error) {
throw new Error(error.message || error.toString());
}
try {
const page = await browser.newPage();
page.setDefaultTimeout(this.options.maxWait);
@ -116,10 +122,10 @@ class PuppeteerBrowser extends Browser {
}));
this.html = await page.content();
await page.close();
} catch (error) {
throw new Error(error.toString());
throw new Error(error.message || error.toString());
} finally {
await browser.close();
}
}
}

@ -2,7 +2,7 @@
"name": "wappalyzer",
"description": "Uncovers the technologies used on websites",
"homepage": "https://github.com/AliasIO/Wappalyzer",
"version": "5.9.6",
"version": "5.9.7",
"author": "Elbert Alias",
"license": "GPL-3.0",
"repository": {

Loading…
Cancel
Save