Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)

Created:
3 years, 9 months ago by gsennton
Modified:
3 years, 9 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, android-webview-reviews_chromium.org, sadrul, kalyank
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add WebView-specific whitelist for crash keys. WebView shouldn't upload data representing all crash keys declared by Chrome since some of that data could be private. To be able to re-use the existing crash-keys mechanism we here add a WebView-only whitelist that will be applied at the time data is set for a key, rather than at registration time. In this way we ensure that all keys that are being set are also being registered, while allowing WebView to avoid adding all registered keys. BUG=691560 Review-Url: https://codereview.chromium.org/2717223003 Cr-Commit-Position: refs/heads/master@{#454611} Committed: https://chromium.googlesource.com/chromium/src/+/59b1a9c899d5f75c24d848df7f0975e217f8bfc3

Patch Set 1 #

Total comments: 19

Patch Set 2 : Use non-allocating whitelist implementation. Add instrumentation tests. #

Total comments: 4

Patch Set 3 : Use NULL-terminated char-array as whitelist. Clean up breakpad_linux, and aw/crash_keys. #

Patch Set 4 : Remove unnecessary imports/includes. #

Total comments: 4

Patch Set 5 : Init whitelist vars in breakpad_linux + move crash-calls from aw_debug to aw/crash_keys (to avoid a… #

Total comments: 24

Patch Set 6 : Fix Robert's comments (mainly naming, formatting + remove some unnecessary calls). #

Total comments: 4

Patch Set 7 : Naming webview whitelist array. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -14 lines) Patch
M android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc View 1 2 3 4 5 6 3 chunks +7 lines, -0 lines 0 comments Download
M android_webview/common/crash_reporter/crash_keys.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M android_webview/common/crash_reporter/crash_keys.cc View 1 2 3 4 5 6 2 chunks +136 lines, -11 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwDebug.java View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwDebugTest.java View 1 2 3 4 5 3 chunks +78 lines, -0 lines 0 comments Download
M android_webview/native/aw_debug.cc View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/common/crash_keys.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M components/crash/content/app/breakpad_linux.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M components/crash/content/app/breakpad_linux.cc View 1 2 3 4 5 4 chunks +23 lines, -1 line 0 comments Download
M components/crash/content/app/crash_reporter_client.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M components/crash/content/app/crash_reporter_client.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
gsennton
Hey, this is an initial CL for the crash-keys whitelist. It's not ready for review, ...
3 years, 9 months ago (2017-02-27 18:31:38 UTC) #2
Robert Sesek
https://codereview.chromium.org/2717223003/diff/1/android_webview/common/crash_reporter/crash_keys.cc File android_webview/common/crash_reporter/crash_keys.cc (right): https://codereview.chromium.org/2717223003/diff/1/android_webview/common/crash_reporter/crash_keys.cc#newcode181 android_webview/common/crash_reporter/crash_keys.cc:181: base::debug::CrashKey fixed_keys[] = { Since we're mostly storing small ...
3 years, 9 months ago (2017-02-27 23:15:29 UTC) #3
gsennton
Alright, cool! This should be close to done now (want to add some unit tests ...
3 years, 9 months ago (2017-02-28 21:02:42 UTC) #4
Tobias Sargeant
https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc File components/crash/content/app/breakpad_linux.cc (right): https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc#newcode1104 components/crash/content/app/breakpad_linux.cc:1104: std::unordered_set<std::string> g_crash_keys_whitelist; On 2017/02/28 21:02:42, gsennton wrote: > On ...
3 years, 9 months ago (2017-02-28 22:18:55 UTC) #6
gsennton
https://codereview.chromium.org/2717223003/diff/20001/components/crash/content/app/crash_reporter_client.h File components/crash/content/app/crash_reporter_client.h (right): https://codereview.chromium.org/2717223003/diff/20001/components/crash/content/app/crash_reporter_client.h#newcode150 components/crash/content/app/crash_reporter_client.h:150: virtual std::vector<const char*> GetWhiteListedCrashKeys(); On 2017/02/28 22:18:55, Tobias Sargeant ...
3 years, 9 months ago (2017-03-01 15:53:02 UTC) #7
Tobias Sargeant
On 2017/03/01 15:53:02, gsennton wrote: > If there aren't any whitelisted keys, shouldn't that mean ...
3 years, 9 months ago (2017-03-01 16:06:46 UTC) #8
gsennton
On 2017/03/01 16:06:46, Tobias Sargeant wrote: > On 2017/03/01 15:53:02, gsennton wrote: > > > ...
3 years, 9 months ago (2017-03-02 09:41:39 UTC) #9
Robert Sesek
https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc File components/crash/content/app/breakpad_linux.cc (right): https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc#newcode1104 components/crash/content/app/breakpad_linux.cc:1104: std::unordered_set<std::string> g_crash_keys_whitelist; On 2017/02/28 22:18:55, Tobias Sargeant wrote: > ...
3 years, 9 months ago (2017-03-02 15:00:38 UTC) #10
gsennton
Alright, this should be fine now. PTAL :) https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc File components/crash/content/app/breakpad_linux.cc (right): https://codereview.chromium.org/2717223003/diff/1/components/crash/content/app/breakpad_linux.cc#newcode1104 components/crash/content/app/breakpad_linux.cc:1104: std::unordered_set<std::string> ...
3 years, 9 months ago (2017-03-02 16:18:01 UTC) #11
Tobias Sargeant
https://codereview.chromium.org/2717223003/diff/60001/android_webview/native/aw_debug.cc File android_webview/native/aw_debug.cc (right): https://codereview.chromium.org/2717223003/diff/60001/android_webview/native/aw_debug.cc#newcode43 android_webview/native/aw_debug.cc:43: breakpad::InitCrashKeysForTesting(); Could you move this to aw/common/crash_reporter/crash_keys.cc so as ...
3 years, 9 months ago (2017-03-02 16:36:48 UTC) #12
gsennton
Thanks for the quick review Toby! https://codereview.chromium.org/2717223003/diff/60001/android_webview/native/aw_debug.cc File android_webview/native/aw_debug.cc (right): https://codereview.chromium.org/2717223003/diff/60001/android_webview/native/aw_debug.cc#newcode43 android_webview/native/aw_debug.cc:43: breakpad::InitCrashKeysForTesting(); On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 17:35:38 UTC) #13
Tobias Sargeant
On 2017/03/02 17:35:38, gsennton wrote: > Thanks for the quick review Toby! > > https://codereview.chromium.org/2717223003/diff/60001/android_webview/native/aw_debug.cc ...
3 years, 9 months ago (2017-03-02 18:49:07 UTC) #14
Robert Sesek
https://codereview.chromium.org/2717223003/diff/80001/android_webview/common/crash_reporter/crash_keys.cc File android_webview/common/crash_reporter/crash_keys.cc (right): https://codereview.chromium.org/2717223003/diff/80001/android_webview/common/crash_reporter/crash_keys.cc#newcode142 android_webview/common/crash_reporter/crash_keys.cc:142: const char* WHITE_LISTED_WEBVIEW_CRASH_KEYS[] = { Can this be even ...
3 years, 9 months ago (2017-03-02 22:29:40 UTC) #15
Robert Sesek
https://codereview.chromium.org/2717223003/diff/80001/components/crash/content/app/crash_reporter_client.h File components/crash/content/app/crash_reporter_client.h (right): https://codereview.chromium.org/2717223003/diff/80001/components/crash/content/app/crash_reporter_client.h#newcode147 components/crash/content/app/crash_reporter_client.h:147: virtual bool UseCrashKeysWhiteList(); On 2017/03/02 22:29:40, Robert Sesek wrote: ...
3 years, 9 months ago (2017-03-02 23:10:49 UTC) #16
gsennton
Thanks Robert! If you are taking another look tonight and no more changes are needed, ...
3 years, 9 months ago (2017-03-03 00:09:33 UTC) #17
Robert Sesek
LGTM https://codereview.chromium.org/2717223003/diff/100001/android_webview/common/crash_reporter/crash_keys.cc File android_webview/common/crash_reporter/crash_keys.cc (right): https://codereview.chromium.org/2717223003/diff/100001/android_webview/common/crash_reporter/crash_keys.cc#newcode143 android_webview/common/crash_reporter/crash_keys.cc:143: static const char* const kWhiteListedWebViewCrashKeys[] = { Change ...
3 years, 9 months ago (2017-03-03 15:57:47 UTC) #18
gsennton
https://codereview.chromium.org/2717223003/diff/100001/android_webview/common/crash_reporter/crash_keys.cc File android_webview/common/crash_reporter/crash_keys.cc (right): https://codereview.chromium.org/2717223003/diff/100001/android_webview/common/crash_reporter/crash_keys.cc#newcode143 android_webview/common/crash_reporter/crash_keys.cc:143: static const char* const kWhiteListedWebViewCrashKeys[] = { On 2017/03/03 ...
3 years, 9 months ago (2017-03-03 16:21:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2717223003/120001
3 years, 9 months ago (2017-03-03 16:22:23 UTC) #22
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 17:43:25 UTC) #25
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/59b1a9c899d5f75c24d848df7f09...

Powered by Google App Engine
This is Rietveld 408576698