<rdar://problem/9227839> REGRESSION: Reproducible crash in Snow Leopard when trying...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Apr 2011 02:13:27 +0000 (02:13 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Apr 2011 02:13:27 +0000 (02:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=57739

Reviewed by Maciej Stachowiak.

* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode): Do not encode the options dictionary on Snow Leopard.
(WebKit::DictionaryPopupInfo::decode): Do not decode the options dictionary on Snow Leopard.
* Shared/DictionaryPopupInfo.h: Removed the options member variable on Snow Leopard.
* Shared/Plugins/PluginQuirks.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange): Do not set the options member variable on
Snow Leopard.

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/DictionaryPopupInfo.cpp
Source/WebKit2/Shared/DictionaryPopupInfo.h
Source/WebKit2/Shared/Plugins/PluginQuirks.h
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

index a13b9d5c5f6ebe192e88914f0784095ac906b3d6..1cbe2351dd3a055c6be7da7789006cb85a194bcd 100644 (file)
@@ -1,3 +1,19 @@
+2011-04-03  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        <rdar://problem/9227839> REGRESSION: Reproducible crash in Snow Leopard when trying to show the Dictionary panel or application
+        https://bugs.webkit.org/show_bug.cgi?id=57739
+
+        * Shared/DictionaryPopupInfo.cpp:
+        (WebKit::DictionaryPopupInfo::encode): Do not encode the options dictionary on Snow Leopard.
+        (WebKit::DictionaryPopupInfo::decode): Do not decode the options dictionary on Snow Leopard.
+        * Shared/DictionaryPopupInfo.h: Removed the options member variable on Snow Leopard.
+        * Shared/Plugins/PluginQuirks.h:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::performDictionaryLookupForRange): Do not set the options member variable on
+        Snow Leopard.
+
 2011-04-02  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Beth Dakin.
index 45bf91d62018372eb27a1a90a327b4caba01988d..1ce93db048a43b51c16362f7b4e685fa58c56702 100644 (file)
@@ -40,7 +40,7 @@ void DictionaryPopupInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
     encoder->encode(fontInfo);
     encoder->encodeEnum(type);
 
-#if PLATFORM(MAC)
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     CoreIPC::encode(encoder, options.get());
 #endif
 }
@@ -53,7 +53,7 @@ bool DictionaryPopupInfo::decode(CoreIPC::ArgumentDecoder* decoder, DictionaryPo
         return false;
     if (!decoder->decodeEnum(result.type))
         return false;
-#if PLATFORM(MAC)
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     if (!CoreIPC::decode(decoder, result.options))
         return false;
 #endif
index 68c81a70a6da2ac6b95360e6c54e628f6cbd5785..866bb6cff16a6bbe68bf855d12c354a07a60b2fd 100644 (file)
@@ -52,7 +52,7 @@ struct DictionaryPopupInfo {
     WebCore::FloatPoint origin;
     FontInfo fontInfo;
     Type type;
-#if PLATFORM(MAC)
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     RetainPtr<CFDictionaryRef> options;
 #endif
 };
index ea4643b8a59a502cd683e5b060cac52c08894b2f..1ea38cd60b6042c71a7197d66ce6920a5ff3142a 100644 (file)
@@ -49,7 +49,7 @@ public:
         MakeTransparentIfBackgroundAttributeExists,
 
 #ifndef NP_NO_QUICKDRAW
-        // Allow the plug-in to use the QuickDraw drawing model, since wenow that the plug-in
+        // Allow the plug-in to use the QuickDraw drawing model, since we know that the plug-in
         // will never paint or receive events. Used by the AppleConnect plug-in.
         AllowHalfBakedQuickDrawSupport,
 #endif
index 383cfa2bfb46617197bc6177567eb04a5b845ab1..6696c8720fead3bcc9cbf5093eedb6b57dec67f6 100644 (file)
@@ -509,7 +509,9 @@ void WebPage::performDictionaryLookupForRange(DictionaryPopupInfo::Type type, Fr
     dictionaryPopupInfo.type = type;
     dictionaryPopupInfo.origin = FloatPoint(rangeRect.x(), rangeRect.y());
     dictionaryPopupInfo.fontInfo.fontAttributeDictionary = fontDescriptorAttributes;
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     dictionaryPopupInfo.options = (CFDictionaryRef)options;
+#endif
 
     send(Messages::WebPageProxy::DidPerformDictionaryLookup(rangeText, dictionaryPopupInfo));
 }