From 69fa838f1a13bcbbe09afd25b4f2c6a9f776dc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Fri, 11 Jan 2013 13:53:45 +0100 Subject: [PATCH] Bug 829477 - Don't notify the UI if we didn't have crash ID. r=fabrice Thanks margaret! --HG-- extra : rebase_source : cde55fa2e2ed892f1f2dd3943122d55dae688e43 --- b2g/chrome/content/shell.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index c56816fa063e..1e4bffdaac48 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -121,12 +121,16 @@ var shell = { } } catch (e) { } - // Let Gaia notify the user of the crash. - this.sendChromeEvent({ - type: "handle-crash", - crashID: crashID, - chrome: isChrome - }); + // We can get here if we're just submitting old pending crashes. + // Check that there's a valid crashID so that we only notify the + // user if a crash just happened and not when we OOM. Bug 829477 + if (crashID) { + this.sendChromeEvent({ + type: "handle-crash", + crashID: crashID, + chrome: isChrome + }); + } }, // this function submit the pending crashes.