Title: [123658] trunk/Source/WebKit2
Revision
123658
Author
[email protected]
Date
2012-07-25 14:13:04 -0700 (Wed, 25 Jul 2012)

Log Message

Crash when calling PluginView::pluginFocusOrWindowFocusChanged when the web page is null
https://bugs.webkit.org/show_bug.cgi?id=92289
<rdar://problem/11785352>

Reviewed by Andreas Kling.

Plug-in views that outlive their containing web page for various reasons (such as being protected from
destruction) need to null check the web page.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginFocusOrWindowFocusChanged):
(WebKit::PluginView::setComplexTextInputState):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (123657 => 123658)


--- trunk/Source/WebKit2/ChangeLog	2012-07-25 21:08:12 UTC (rev 123657)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-25 21:13:04 UTC (rev 123658)
@@ -1,3 +1,18 @@
+2012-07-25  Anders Carlsson  <[email protected]>
+
+        Crash when calling PluginView::pluginFocusOrWindowFocusChanged when the web page is null
+        https://bugs.webkit.org/show_bug.cgi?id=92289
+        <rdar://problem/11785352>
+
+        Reviewed by Andreas Kling.
+
+        Plug-in views that outlive their containing web page for various reasons (such as being protected from
+        destruction) need to null check the web page.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::pluginFocusOrWindowFocusChanged):
+        (WebKit::PluginView::setComplexTextInputState):
+
 2012-07-25  Christophe Dumez  <[email protected]>
 
         [WK2][WTR] LayoutTestController.sendWebIntentResponse() needs to be implemented

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (123657 => 123658)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2012-07-25 21:08:12 UTC (rev 123657)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2012-07-25 21:13:04 UTC (rev 123658)
@@ -1180,12 +1180,14 @@
 #if PLATFORM(MAC)
 void PluginView::pluginFocusOrWindowFocusChanged(bool pluginHasFocusAndWindowHasFocus)
 {
-    m_webPage->send(Messages::WebPageProxy::PluginFocusOrWindowFocusChanged(m_plugin->pluginComplexTextInputIdentifier(), pluginHasFocusAndWindowHasFocus));
+    if (m_webPage)
+        m_webPage->send(Messages::WebPageProxy::PluginFocusOrWindowFocusChanged(m_plugin->pluginComplexTextInputIdentifier(), pluginHasFocusAndWindowHasFocus));
 }
 
 void PluginView::setComplexTextInputState(PluginComplexTextInputState pluginComplexTextInputState)
 {
-    m_webPage->send(Messages::WebPageProxy::SetPluginComplexTextInputState(m_plugin->pluginComplexTextInputIdentifier(), pluginComplexTextInputState));
+    if (m_webPage)
+        m_webPage->send(Messages::WebPageProxy::SetPluginComplexTextInputState(m_plugin->pluginComplexTextInputIdentifier(), pluginComplexTextInputState));
 }
 
 mach_port_t PluginView::compositingRenderServerPort()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to