2011-02-19 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Feb 2011 21:57:28 +0000 (21:57 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Feb 2011 21:57:28 +0000 (21:57 +0000)
        Reviewed by Dan Bernstein.

        Crash when trying to take a snapshot of an uninitialized plug-in
        https://bugs.webkit.org/show_bug.cgi?id=54812

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::notifyWidget):
        Don't try to create a snapshot of the plug-in if it hasn't been initialized.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp

index d8fee30..411846f 100644 (file)
@@ -1,3 +1,14 @@
+2011-02-19  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Crash when trying to take a snapshot of an uninitialized plug-in
+        https://bugs.webkit.org/show_bug.cgi?id=54812
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::notifyWidget):
+        Don't try to create a snapshot of the plug-in if it hasn't been initialized.
+
 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
 
         Reviewed by Sam Weinig.
index 9e45e33..c92e5e8 100644 (file)
@@ -594,7 +594,7 @@ void PluginView::notifyWidget(WidgetNotification notification)
 {
     switch (notification) {
     case WillPaintFlattened:
-        if (m_plugin)
+        if (m_plugin && m_isInitialized)
             m_snapshot = m_plugin->snapshot();
         break;
     case DidPaintFlattened: