Commit 00a60ff6 authored by rsesek's avatar rsesek Committed by Commit bot

Store the NSEvent.description in a crash key in -[BrowserCrApplication sendEvent:].

BUG=520706
R=erikchen@chromium.org

Review-Url: https://codereview.chromium.org/2545823002
Cr-Commit-Position: refs/heads/master@{#435630}
parent d8c7a8ac
...@@ -351,6 +351,9 @@ void CancelTerminate() { ...@@ -351,6 +351,9 @@ void CancelTerminate() {
} }
- (void)sendEvent:(NSEvent*)event { - (void)sendEvent:(NSEvent*)event {
base::debug::ScopedCrashKey crash_key(
crash_keys::mac::kNSEvent, base::SysNSStringToUTF8([event description]));
base::mac::CallWithEHFrame(^{ base::mac::CallWithEHFrame(^{
switch (event.type) { switch (event.type) {
case NSLeftMouseDown: case NSLeftMouseDown:
......
...@@ -82,6 +82,8 @@ const char kNSExceptionTrace[] = "nsexception_bt"; ...@@ -82,6 +82,8 @@ const char kNSExceptionTrace[] = "nsexception_bt";
const char kSendAction[] = "sendaction"; const char kSendAction[] = "sendaction";
const char kNSEvent[] = "nsevent";
} // namespace mac } // namespace mac
#endif #endif
...@@ -156,6 +158,7 @@ size_t RegisterChromeCrashKeys() { ...@@ -156,6 +158,7 @@ size_t RegisterChromeCrashKeys() {
{ mac::kNSException, kMediumSize }, { mac::kNSException, kMediumSize },
{ mac::kNSExceptionTrace, kMediumSize }, { mac::kNSExceptionTrace, kMediumSize },
{ mac::kSendAction, kMediumSize }, { mac::kSendAction, kMediumSize },
{ mac::kNSEvent, kMediumSize },
{ mac::kZombie, kMediumSize }, { mac::kZombie, kMediumSize },
{ mac::kZombieTrace, kMediumSize }, { mac::kZombieTrace, kMediumSize },
// content/: // content/:
......
...@@ -130,6 +130,9 @@ extern const char kNSExceptionTrace[]; ...@@ -130,6 +130,9 @@ extern const char kNSExceptionTrace[];
// target-action. // target-action.
extern const char kSendAction[]; extern const char kSendAction[];
// In the CrApplication, records information about the current event.
extern const char kNSEvent[];
} // namespace mac } // namespace mac
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment