Bug 634387 - "[Mac] Firefox 4.0b12pre crash in mozilla::plugins::PPluginInstanceChild::FatalError [@ mozalloc_abort | NS_DebugBreak_P] opening a tab with Cmd-T while a Flash video has focus (youtube)" [r=smichaud, a=hardblocker]
authorJosh Aas <joshmoz>
Sat, 19 Feb 2011 00:24:00 -0800
changeset 62865 97625b507157c24adef2f2ac31692c0a2a5bb718
parent 62864 afba7603a946119551165dae195e7f1be9f75799
child 62866 4ae4b97f392bafd1fb8e7d6651f1c00da902db4d
push idunknown
push userunknown
push dateunknown
reviewerssmichaud, hardblocker
bugs634387
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 634387 - "[Mac] Firefox 4.0b12pre crash in mozilla::plugins::PPluginInstanceChild::FatalError [@ mozalloc_abort | NS_DebugBreak_P] opening a tab with Cmd-T while a Flash video has focus (youtube)" [r=smichaud, a=hardblocker]
widget/src/cocoa/nsChildView.mm
--- a/widget/src/cocoa/nsChildView.mm
+++ b/widget/src/cocoa/nsChildView.mm
@@ -5756,27 +5756,29 @@ static const char* ToEscapedString(NSStr
 
   PRUint32 message = isKeyDown ? NS_KEY_DOWN : NS_KEY_UP;
 
   // Fire a key event.
   nsKeyEvent geckoEvent(PR_TRUE, message, nsnull);
   [self convertCocoaKeyEvent:theEvent toGeckoEvent:&geckoEvent];
 
   // create event for use by plugins
+  if (mIsPluginView) {
 #ifndef NP_NO_CARBON
-  EventRecord carbonEvent;
-  if (mPluginEventModel == NPEventModelCarbon) {
-    ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent, message);
-    geckoEvent.pluginEvent = &carbonEvent;
-  }
+    EventRecord carbonEvent;
+    if (mPluginEventModel == NPEventModelCarbon) {
+      ConvertCocoaKeyEventToCarbonEvent(theEvent, carbonEvent, message);
+      geckoEvent.pluginEvent = &carbonEvent;
+    }
 #endif
-  NPCocoaEvent cocoaEvent;
-  if (mPluginEventModel == NPEventModelCocoa) {
-    ConvertCocoaKeyEventToNPCocoaEvent(theEvent, cocoaEvent, message);
-    geckoEvent.pluginEvent = &cocoaEvent;
+    NPCocoaEvent cocoaEvent;
+    if (mPluginEventModel == NPEventModelCocoa) {
+      ConvertCocoaKeyEventToNPCocoaEvent(theEvent, cocoaEvent, message);
+      geckoEvent.pluginEvent = &cocoaEvent;
+    }
   }
 
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (BOOL)inactiveWindowAcceptsMouseEvent:(NSEvent*)aEvent