MHTML files removed by URL.revokeObjectURL are not deleted, leading to Chrome to Crash
Reported by
o...@testim.io,
Aug 18 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Steps to reproduce the problem: 1. Install the attached unpacked extension via chrome://extensions (reduced problem to 15 lines of code) 2. Open the extension's popup and set the input (labeled "Number of MHTML to Create") to 50000, and click start What is the expected behavior? Chrome to generate 50000 mhtml files and delete them. What went wrong? Chrome crashes WebStore page: https://chrome.google.com/webstore/detail/testim-editor/pebeiooilphfmbohdbhbomomkkoghoia Did this work before? N/A Chrome version: 50.0.2661.86 Channel: stable OS Version: Ubuntu Server 16.04 Flash Version: The code creates mhtml files via the pageCapture extension API* Works on Mac. Crashes on Linux with docker (Docker version 1.11.0, build 4dc5990). * https://developer.chrome.com/extensions/pageCapture
,
Aug 19 2016
@oren: Could you please provide us the screen-recording of this issue for better understanding. This would help us in triaging it further. Thank you.
,
Aug 19 2016
Please see attached screenshot of the extension (with minimum code to reproduce).
The pseudo code is:
for (1.. 50000) {
var blob = chrome.pageCapture.saveAsMHTML();
var url = URL.createObjectURL(blob);
URL.revokeObjectURL(url);
}
The actual code is found in background.js comprising:
function deleteBlob(blob) {
var url = URL.createObjectURL(blob);
URL.revokeObjectURL(url);
}
function createMhtml(tabId) {
chrome.pageCapture.saveAsMHTML({"tabId" : tabId}, function(pageDomBlob){
if (chrome.runtime.lastError) {
console.error("Failed to save page as MHTML", chrome.runtime.lastError.message);
} else {
console.log("Tab id:", tabId ,"saved as MHTML");
//delete blob
deleteBlob(pageDomBlob);
}
});
}
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
if(request.tabId && request.msg === 'saveAsMHTML' && request.numOfMhtml) {
for (i = 0; i < parseInt(request.numOfMhtml); i++) {
createMhtml(request.tabId);
}
}
});
,
Aug 26 2016
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 9 2016
Can you get a crash report id? https://www.chromium.org/for-testers/bug-reporting-guidelines/reporting-crash-bug
,
Sep 11 2017
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by o...@testim.io
, Aug 18 2016