summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 19:43:11 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 19:43:11 +0000
commit1f05a953388ce26cb54a875848abf3469d381813 (patch)
treebc5a868dc0dbbafe25ce0b96a9c6302143877efc /content
parent4cc93f0be46e85492aad76019866da89dfc4e4b7 (diff)
downloadchromium_src-1f05a953388ce26cb54a875848abf3469d381813.zip
chromium_src-1f05a953388ce26cb54a875848abf3469d381813.tar.gz
chromium_src-1f05a953388ce26cb54a875848abf3469d381813.tar.bz2
Merge 82397 - [Mac] Reset isHandlingSendEvent flag in case of exceptional condition.
NSExceptions can cause the flag to get latched to YES, which messeswith window closing. A number of suspected exceptions shouldn't causetoo much other damage, so this patches over the problem for the shortterm. TBR=jam@chromium.org BUG=45928 TEST=see bug Review URL: http://codereview.chromium.org/6873081 TBR=shess@chromium.org Review URL: http://codereview.chromium.org/6883130 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/chrome_application_mac.h4
-rw-r--r--content/common/chrome_application_mac.mm4
2 files changed, 8 insertions, 0 deletions
diff --git a/content/common/chrome_application_mac.h b/content/common/chrome_application_mac.h
index 80e2c4a..2979720 100644
--- a/content/common/chrome_application_mac.h
+++ b/content/common/chrome_application_mac.h
@@ -28,6 +28,10 @@
}
- (BOOL)isHandlingSendEvent;
+// Unconditionally clears |handlingSendEvent_|. This should not be
+// used except in recovering from some sort of exceptional condition.
+- (void)clearIsHandlingSendEvent;
+
// Add or remove an event hook to be called for every sendEvent:
// that the application receives. These handlers are called before
// the normal [NSApplication sendEvent:] call is made.
diff --git a/content/common/chrome_application_mac.mm b/content/common/chrome_application_mac.mm
index e4adb3a..f21852f 100644
--- a/content/common/chrome_application_mac.mm
+++ b/content/common/chrome_application_mac.mm
@@ -39,6 +39,10 @@
handlingSendEvent_ = handlingSendEvent;
}
+- (void)clearIsHandlingSendEvent {
+ [self setHandlingSendEvent:NO];
+}
+
- (void)sendEvent:(NSEvent*)event {
chrome_application_mac::ScopedSendingEvent sendingEventScoper;
for (id<CrApplicationEventHookProtocol> handler in eventHooks_.get()) {