diff options
author | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-29 18:10:49 +0000 |
---|---|---|
committer | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-29 18:10:49 +0000 |
commit | 24641d7db8a175289c3c142e4740faf84f17f4ee (patch) | |
tree | aaa0883d2aaa7d1232be1abb97a68f569a627a02 /chrome/browser | |
parent | 63d4690499dedbd0afe7a9ecdb794aa99f7a900d (diff) | |
download | chromium_src-24641d7db8a175289c3c142e4740faf84f17f4ee.zip chromium_src-24641d7db8a175289c3c142e4740faf84f17f4ee.tar.gz chromium_src-24641d7db8a175289c3c142e4740faf84f17f4ee.tar.bz2 |
Fix crash when user presses send report before onload handler was called
Crash dump from the bug shows that crash happened during call "bug_report_->UpdateData(...)" that was inlined into HandleSendReport. It looks like bug_report_ is NULL. bug_report_ is initialized with new object in HandleGetDialogDefaults that is called from JavaScript in window onload handler. So it looks like user clicked on send report button before the page is loaded and onload handler was called.
BUG=chromium-os:10240
TEST=none
Review URL: http://codereview.chromium.org/5958016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/dom_ui/bug_report_ui.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/bug_report_ui.cc b/chrome/browser/dom_ui/bug_report_ui.cc index 4c92c73..2641aff 100644 --- a/chrome/browser/dom_ui/bug_report_ui.cc +++ b/chrome/browser/dom_ui/bug_report_ui.cc @@ -653,6 +653,11 @@ void BugReportHandler::HandleRefreshSavedScreenshots(const ListValue*) { void BugReportHandler::HandleSendReport(const ListValue* list_value) { + if (!bug_report_) { + LOG(ERROR) << "Bug report hasn't been intialized yet."; + return; + } + ListValue::const_iterator i = list_value->begin(); if (i == list_value->end()) { LOG(ERROR) << "Incorrect data passed to sendReport."; |