summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 04:25:58 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 04:25:58 +0000
commitc91e99322f0ac5ef76165c76eb5ac3ae03f923ab (patch)
tree0ceae164e7ebc150e3ea8d2cdaa50644035b1b5e /chrome/app
parent4f38642501dba0b9d93f24392daf26db428b8ea8 (diff)
downloadchromium_src-c91e99322f0ac5ef76165c76eb5ac3ae03f923ab.zip
chromium_src-c91e99322f0ac5ef76165c76eb5ac3ae03f923ab.tar.gz
chromium_src-c91e99322f0ac5ef76165c76eb5ac3ae03f923ab.tar.bz2
Fix start up crash when --disable-breakpad is used.
We should check whether breakpad is initialized before setting custom entries. BUG=49368 TEST=Chrome.exe --disable-breakpad Review URL: http://codereview.chromium.org/3010013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/breakpad_win.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc
index 542bcd9..95d46fb 100644
--- a/chrome/app/breakpad_win.cc
+++ b/chrome/app/breakpad_win.cc
@@ -254,6 +254,9 @@ extern "C" void __declspec(dllexport) __cdecl SetActiveURL(
const wchar_t* url_cstring) {
DCHECK(url_cstring);
+ if (!g_custom_entries)
+ return;
+
std::wstring url(url_cstring);
size_t chunk_index = 0;
size_t url_size = url.size();
@@ -284,6 +287,9 @@ extern "C" void __declspec(dllexport) __cdecl SetClientId(
if (client_id == NULL)
return;
+ if (!g_custom_entries)
+ return;
+
wcscpy_s((*g_custom_entries)[g_client_id_offset].value,
google_breakpad::CustomInfoEntry::kValueMaxLength,
client_id);
@@ -294,6 +300,9 @@ extern "C" void __declspec(dllexport) __cdecl SetExtensionID(
DCHECK(id);
DCHECK(index < kMaxReportedActiveExtensions);
+ if (!g_custom_entries)
+ return;
+
wcscpy_s((*g_custom_entries)[g_extension_ids_offset + index].value,
google_breakpad::CustomInfoEntry::kValueMaxLength,
id);
@@ -303,6 +312,9 @@ extern "C" void __declspec(dllexport) __cdecl SetGpuInfo(
const wchar_t* vendor_id, const wchar_t* device_id,
const wchar_t* driver_version, const wchar_t* pixel_shader_version,
const wchar_t* vertex_shader_version) {
+ if (!g_custom_entries)
+ return;
+
wcscpy_s((*g_custom_entries)[g_gpu_info_offset].value,
google_breakpad::CustomInfoEntry::kValueMaxLength,
vendor_id);