Chrome can't capture "out of memory exception" in window.error
Reported by
zhaoyu0...@gmail.com,
Aug 24 2016
|
|||
Issue description
Chrome Version: 52.0.2743.116 (Official Build) m (64-bit)
Other browsers tested:
have tested this issue:
Safari:Not test
Firefox:Not test
IE:OK (Can capture exception)
What steps will reproduce the problem?
Run following code in Chrome: (produce out of memory)
window.onerror = function (msg) {
alert(msg);
return false;
};
var data = [];
window.setInterval(function () {
for (var i = 0; i < 100000; i++) {
data.push({ id: i, p1: i, p2: i });
}
}, 1);
What is the expected result?
Capture "Out of memory" exception in window.error. I want to log and determine how many users encountered this error.
What happens instead?
Chrome will crash and shows "aw snap something went wrong while displaying this webpage". The browser can't log anything to server.
Please provide any additional information below. Attach a screenshot if
possible.
,
Aug 25 2016
Thanks kavvaru! The crash is expected. The bug is Chrome can't capture the exception in window.error before crash. So developer are not able to log it.
,
Aug 26 2016
I'm not sure there's something we can do here. Alexey, any thoughts?
,
Aug 27 2016
Out of memory exception isn't part of spec. We can't implement it without spec because there are a lot of tricky questions. User needs some memory to send something to server, how we need to reserve it or we need to be able to free some memory after OOM. Or we can introduce some API like please make this fetch request when OOM happens and forbid everything else on OOM. For now it's wontfix, JavaScript world doesn't ready for this. |
|||
►
Sign in to add a comment |
|||
Comment 1 by kavvaru@chromium.org
, Aug 25 2016Labels: M-54 OS-Linux OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)