Fix memory leak

This commit is contained in:
Les De Ridder 2016-01-25 14:16:03 +01:00
parent e669726ed3
commit 152f54f23b
3 changed files with 3 additions and 2 deletions

View File

@ -65,6 +65,8 @@ chrome.pageAction.onClicked.addListener(function(tab) {
if(config.replacebookmark) { if(config.replacebookmark) {
replaceBookmark(url, newUrl); replaceBookmark(url, newUrl);
} }
worker.terminate();
}; };
worker.postMessage(JSON.stringify({pomfclone: config.url, url: betterUrl, filename: filename})); worker.postMessage(JSON.stringify({pomfclone: config.url, url: betterUrl, filename: filename}));
}); });

View File

@ -42,6 +42,7 @@
<!-- <!--
TODO: TODO:
* Disable blacklist (checkbox) * Disable blacklist (checkbox)
* Add progress/status messages
* Add imageboard thread archival support * Add imageboard thread archival support
* Add booru support * Add booru support
* Add imgur album support * Add imgur album support

View File

@ -21,8 +21,6 @@ function uploadBuffer(pomfclone, buffer, filename) {
var request = new XMLHttpRequest(); var request = new XMLHttpRequest();
request.open('POST', pomfclone + '/upload.php', true); request.open('POST', pomfclone + '/upload.php', true);
request.onload = function(e) { request.onload = function(e) {
console.log(request.response);
postMessage(request.response); postMessage(request.response);
}; };
request.send(formData); request.send(formData);