Commit 6faa9cc9 authored by shess@chromium.org's avatar shess@chromium.org

[Mac] Tweak crash logging for -sendEvent: crash.

https://chromiumcodereview.appspot.com/11140040 adds the event's
-description as a breakpad key.  Unfortunately, event type 28, which
is undocumented, is sent by Mountain Lion when you do a control-scroll
zoom.  Work around it manually.

BUG=154483,156103


Review URL: https://chromiumcodereview.appspot.com/11198008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162397 0039d316-1c4b-4281-b951-d872f2087c98
parent deb44769
...@@ -435,7 +435,10 @@ void SwizzleInit() { ...@@ -435,7 +435,10 @@ void SwizzleInit() {
// Current hypothesis is that it's a keyboard accelerator. // Current hypothesis is that it's a keyboard accelerator.
// http://crbug.com/154483 // http://crbug.com/154483
static NSString* const kSendEventKey = @"sendevent"; static NSString* const kSendEventKey = @"sendevent";
base::mac::ScopedCrashKey key(kSendEventKey, [event description]); // For NSEventType 28, recursive -description causes a crash.
// Not much to be done, that type is undocumented.
NSString* value = [event type] == 28 ? @"type=28" : [event description];
base::mac::ScopedCrashKey key(kSendEventKey, value);
base::mac::ScopedSendingEvent sendingEventScoper; base::mac::ScopedSendingEvent sendingEventScoper;
for (id<CrApplicationEventHookProtocol> handler in eventHooks_.get()) { for (id<CrApplicationEventHookProtocol> handler in eventHooks_.get()) {
......
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