Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/common/crash_reporter/crash_keys.h" | 5 #include "android_webview/common/crash_reporter/crash_keys.h" |
| 6 | 6 |
| 7 #include "base/debug/crash_logging.h" | 7 #include "base/debug/crash_logging.h" |
| 8 #include "components/crash/core/common/crash_keys.h" | 8 #include "components/crash/core/common/crash_keys.h" |
| 9 | 9 |
| 10 using namespace crash_keys; | 10 using namespace crash_keys; |
| 11 | 11 |
| 12 namespace android_webview { | 12 namespace android_webview { |
| 13 namespace crash_keys { | 13 namespace crash_keys { |
| 14 | 14 |
| 15 const char kActiveURL[] = "url-chunk"; | |
| 16 | |
| 15 const char kGPUDriverVersion[] = "gpu-driver"; | 17 const char kGPUDriverVersion[] = "gpu-driver"; |
| 16 const char kGPUPixelShaderVersion[] = "gpu-psver"; | 18 const char kGPUPixelShaderVersion[] = "gpu-psver"; |
| 17 const char kGPUVertexShaderVersion[] = "gpu-vsver"; | 19 const char kGPUVertexShaderVersion[] = "gpu-vsver"; |
| 18 const char kGPUVendor[] = "gpu-gl-vendor"; | 20 const char kGPUVendor[] = "gpu-gl-vendor"; |
| 19 const char kGPURenderer[] = "gpu-gl-renderer"; | 21 const char kGPURenderer[] = "gpu-gl-renderer"; |
| 20 | 22 |
| 21 size_t RegisterWebViewCrashKeys() { | 23 size_t RegisterWebViewCrashKeys() { |
| 22 base::debug::CrashKey fixed_keys[] = { | 24 base::debug::CrashKey fixed_keys[] = { |
| 23 { kGPUDriverVersion, kSmallSize }, | 25 {kActiveURL, kLargeSize}, |
|
Tobias Sargeant
2017/02/20 11:47:18
We shouldn't log this; it's PII.
| |
| 24 { kGPUPixelShaderVersion, kSmallSize }, | 26 {kGPUDriverVersion, kSmallSize}, |
| 25 { kGPUVertexShaderVersion, kSmallSize }, | 27 {kGPUPixelShaderVersion, kSmallSize}, |
| 26 { kGPUVendor, kSmallSize }, | 28 {kGPUVertexShaderVersion, kSmallSize}, |
| 27 { kGPURenderer, kSmallSize }, | 29 {kGPUVendor, kSmallSize}, |
| 30 {kGPURenderer, kSmallSize}, | |
| 28 | 31 |
| 29 // content/: | 32 // TODO some of the crash keys are never used. E.g. kBug464926CrashKey |
| 30 { "bad_message_reason", kSmallSize }, | 33 |
| 31 { "discardable-memory-allocated", kSmallSize }, | 34 // content/: |
| 32 { "discardable-memory-free", kSmallSize }, | 35 {"bad_message_reason", kSmallSize}, |
| 33 { "mojo-message-error", kMediumSize }, | 36 {"discardable-memory-allocated", kSmallSize}, |
| 34 { "total-discardable-memory-allocated", kSmallSize }, | 37 {"discardable-memory-free", kSmallSize}, |
| 38 {"mojo-message-error", kMediumSize}, | |
| 39 {"ppapi_path", kMediumSize}, | |
|
Tobias Sargeant
2017/02/20 11:47:17
Pepper plugin isn't used in webview.
| |
| 40 {"subresource_url", kLargeSize}, | |
|
Tobias Sargeant
2017/02/20 11:47:18
Shouldn't log URLs.
| |
| 41 {"total-discardable-memory-allocated", kSmallSize}, | |
| 42 | |
| 43 // gin/: | |
| 44 {"v8-ignition", kSmallSize}, | |
| 45 | |
| 46 // TODO is this needed? | |
| 47 // sandbox/: | |
| 48 {"seccomp-sigsys", kMediumSize}, | |
|
Tobias Sargeant
2017/02/20 11:47:18
Correct me if I'm wrong, Robert, but won't this be
Robert Sesek
2017/02/22 16:41:36
Not at all. This was added for Android.
| |
| 49 | |
| 50 // Temporary for http://crbug.com/575245. | |
|
Tobias Sargeant
2017/02/20 11:47:18
We've only seen 8 reports for this bug. I don't th
| |
| 51 {"swapout_frame_id", kSmallSize}, | |
| 52 {"swapout_proxy_id", kSmallSize}, | |
| 53 {"swapout_view_id", kSmallSize}, | |
| 54 {"commit_frame_id", kSmallSize}, | |
| 55 {"commit_proxy_id", kSmallSize}, | |
| 56 {"commit_view_id", kSmallSize}, | |
| 57 {"commit_main_render_frame_id", kSmallSize}, | |
| 58 {"newproxy_proxy_id", kSmallSize}, | |
| 59 {"newproxy_view_id", kSmallSize}, | |
| 60 {"newproxy_opener_id", kSmallSize}, | |
| 61 {"newproxy_parent_id", kSmallSize}, | |
| 62 {"rvinit_view_id", kSmallSize}, | |
| 63 {"rvinit_proxy_id", kSmallSize}, | |
| 64 {"rvinit_main_frame_id", kSmallSize}, | |
| 65 {"initrf_frame_id", kSmallSize}, | |
| 66 {"initrf_proxy_id", kSmallSize}, | |
| 67 {"initrf_view_id", kSmallSize}, | |
| 68 {"initrf_main_frame_id", kSmallSize}, | |
| 69 {"initrf_view_is_live", kSmallSize}, | |
| 70 | |
| 71 // Temporary for https://crbug.com/591478. | |
|
Tobias Sargeant
2017/02/20 11:47:17
0 reports for this one.
| |
| 72 {"initrf_parent_proxy_exists", kSmallSize}, | |
| 73 {"initrf_render_view_is_live", kSmallSize}, | |
| 74 {"initrf_parent_is_in_same_site_instance", kSmallSize}, | |
| 75 {"initrf_parent_process_is_live", kSmallSize}, | |
| 76 {"initrf_root_is_in_same_site_instance", kSmallSize}, | |
| 77 {"initrf_root_is_in_same_site_instance_as_parent", kSmallSize}, | |
| 78 {"initrf_root_process_is_live", kSmallSize}, | |
| 79 {"initrf_root_proxy_is_live", kSmallSize}, | |
| 80 | |
| 81 // Temporary for https://crbug.com/626802. | |
|
Tobias Sargeant
2017/02/20 11:47:18
Also 0.
| |
| 82 {"newframe_routing_id", kSmallSize}, | |
| 83 {"newframe_proxy_id", kSmallSize}, | |
| 84 {"newframe_opener_id", kSmallSize}, | |
| 85 {"newframe_parent_id", kSmallSize}, | |
| 86 {"newframe_widget_id", kSmallSize}, | |
| 87 {"newframe_widget_hidden", kSmallSize}, | |
| 88 {"newframe_replicated_origin", kSmallSize}, | |
| 89 {"newframe_oopifs_possible", kSmallSize}, | |
| 90 | |
| 91 // Temporary for https://crbug.com/630103. | |
| 92 {"origin_mismatch_url", kLargeSize}, | |
| 93 {"origin_mismatch_origin", kMediumSize}, | |
| 94 {"origin_mismatch_transition", kSmallSize}, | |
| 95 {"origin_mismatch_redirects", kSmallSize}, | |
| 96 {"origin_mismatch_same_page", kSmallSize}, | |
| 97 | |
| 98 // Temporary for https://crbug.com/612711. | |
|
Tobias Sargeant
2017/02/20 11:47:17
No extensions for webview.
| |
| 99 {"aci_wrong_sp_extension_id", kSmallSize}, | |
| 100 | |
| 101 // Temporary for https://crbug.com/616149. | |
|
Tobias Sargeant
2017/02/20 11:47:17
Ditto.
| |
| 102 {"existing_extension_pref_value_type", kSmallSize}, | |
| 103 | |
| 104 // Temporary for https://crbug.com/668633. | |
|
Tobias Sargeant
2017/02/20 11:47:17
Service workers are effectively unused in webview,
| |
| 105 {"swdh_set_hosted_version_worker_pid", kSmallSize}, | |
| 106 {"swdh_set_hosted_version_host_pid", kSmallSize}, | |
| 107 {"swdh_set_hosted_version_is_new_process", kSmallSize}, | |
| 108 {"swdh_set_hosted_version_restart_count", kSmallSize}, | |
| 35 }; | 109 }; |
| 36 | 110 |
| 37 std::vector<base::debug::CrashKey> keys(fixed_keys, | 111 std::vector<base::debug::CrashKey> keys(fixed_keys, |
| 38 fixed_keys + arraysize(fixed_keys)); | 112 fixed_keys + arraysize(fixed_keys)); |
| 39 | 113 |
| 40 return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength); | 114 return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength); |
| 41 } | 115 } |
| 42 } | 116 } |
| 43 | 117 |
| 44 } // namespace crash_keys | 118 } // namespace crash_keys |
| OLD | NEW |