2006-10-04 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 18:04:16 +0000 (18:04 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 18:04:16 +0000 (18:04 +0000)
        Reviewed by John Sullivan.

        <rdar://problem/4654328>
        Safari Crashes in WebCore::PluginTokenizer::writeRawData If I Try to Open a SWF File With Plug-ins Turned Off

        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::writeRawData):
        Only send the data to the plug-in if plug-ins are enabled, otherwise just silently eat it.

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

WebCore/ChangeLog
WebCore/loader/PluginDocument.cpp

index 8e8a86722a0ecf7b6ef2c669eeded905f90660ec..058bc117e4bf4be1f7c334a572985231f3248a3d 100644 (file)
@@ -1,3 +1,14 @@
+2006-10-04  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by John Sullivan.
+
+        <rdar://problem/4654328>
+        Safari Crashes in WebCore::PluginTokenizer::writeRawData If I Try to Open a SWF File With Plug-ins Turned Off
+        
+        * loader/PluginDocument.cpp:
+        (WebCore::PluginTokenizer::writeRawData):
+        Only send the data to the plug-in if plug-ins are enabled, otherwise just silently eat it.
+
 2006-10-03  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Tim H.
 2006-10-03  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Tim H.
index 3c2f012dc4751873eb36a0a9c4c447dac728fe2f..8157e84b915264f588c789dd1571053d929dfd0d 100644 (file)
@@ -92,8 +92,13 @@ bool PluginTokenizer::writeRawData(const char* data, int len)
 {
     if (!m_embedElement) {
         createDocumentStructure();
 {
     if (!m_embedElement) {
         createDocumentStructure();
-        m_doc->frame()->redirectDataToPlugin(static_cast<RenderWidget*>(m_embedElement->renderer())->widget());
-        finish();
+
+        if (m_doc->frame()->pluginsEnabled()) {
+            m_doc->frame()->redirectDataToPlugin(static_cast<RenderWidget*>(m_embedElement->renderer())->widget());
+        
+            finish();
+        }
+        
         return false;
     }
     
         return false;
     }