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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 11140040: [Mac] Additional crash logging for -sendEvent: crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/chrome_browser_application_mac.h" 5 #import "chrome/browser/chrome_browser_application_mac.h"
6 6
7 #import "base/auto_reset.h" 7 #import "base/auto_reset.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #include "base/mac/crash_logging.h" 9 #include "base/mac/crash_logging.h"
10 #import "base/mac/scoped_nsexception_enabler.h" 10 #import "base/mac/scoped_nsexception_enabler.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 - (BOOL)isHandlingSendEvent { 425 - (BOOL)isHandlingSendEvent {
426 return handlingSendEvent_; 426 return handlingSendEvent_;
427 } 427 }
428 428
429 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 429 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
430 handlingSendEvent_ = handlingSendEvent; 430 handlingSendEvent_ = handlingSendEvent;
431 } 431 }
432 432
433 - (void)sendEvent:(NSEvent*)event { 433 - (void)sendEvent:(NSEvent*)event {
434 // TODO(shess): Squirrel away some info to direct debugging.
435 // Current hypothesis is that it's a keyboard accelerator.
436 // http://crbug.com/154483
437 static NSString* const kSendEventKey = @"sendevent";
438 base::mac::ScopedCrashKey key(kSendEventKey, [event description]);
439
434 base::mac::ScopedSendingEvent sendingEventScoper; 440 base::mac::ScopedSendingEvent sendingEventScoper;
435 for (id<CrApplicationEventHookProtocol> handler in eventHooks_.get()) { 441 for (id<CrApplicationEventHookProtocol> handler in eventHooks_.get()) {
436 [handler hookForEvent:event]; 442 [handler hookForEvent:event];
437 } 443 }
438 [super sendEvent:event]; 444 [super sendEvent:event];
439 } 445 }
440 446
441 // NSExceptions which are caught by the event loop are logged here. 447 // NSExceptions which are caught by the event loop are logged here.
442 // NSException uses setjmp/longjmp, which can be very bad for C++, so 448 // NSException uses setjmp/longjmp, which can be very bad for C++, so
443 // we attempt to track and report them. 449 // we attempt to track and report them.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 std::vector<NSWindow*>::iterator window_iterator = 581 std::vector<NSWindow*>::iterator window_iterator =
576 std::find(previousKeyWindows_.begin(), 582 std::find(previousKeyWindows_.begin(),
577 previousKeyWindows_.end(), 583 previousKeyWindows_.end(),
578 window); 584 window);
579 if (window_iterator != previousKeyWindows_.end()) { 585 if (window_iterator != previousKeyWindows_.end()) {
580 previousKeyWindows_.erase(window_iterator); 586 previousKeyWindows_.erase(window_iterator);
581 } 587 }
582 } 588 }
583 589
584 @end 590 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698