Title: [93490] trunk/Source/WebKit/qt
Revision
93490
Author
commit-qu...@webkit.org
Date
2011-08-21 08:53:54 -0700 (Sun, 21 Aug 2011)

Log Message

[Qt] Fixes premature plugin unload bug
https://bugs.webkit.org/show_bug.cgi?id=66628

Patch by Lindsay Mathieson <lindsay.mathie...@gmail.com> on 2011-08-21
Reviewed by Benjamin Poulain.

The QtPlatformPlugin was allocated on the stack, so its destructor is unloading the
plugin at the end of the scope. This patch moves the local creation of QtPlatformPlugin
to class member (TextCheckerClientQt::m_platformPlugin), preventing premature unloading
of plugin.

* WebCoreSupport/TextCheckerClientQt.cpp:
(WebCore::TextCheckerClientQt::loadSpellChecker):
* WebCoreSupport/TextCheckerClientQt.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (93489 => 93490)


--- trunk/Source/WebKit/qt/ChangeLog	2011-08-21 06:26:24 UTC (rev 93489)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-08-21 15:53:54 UTC (rev 93490)
@@ -1,3 +1,19 @@
+2011-08-21  Lindsay Mathieson  <lindsay.mathie...@gmail.com>
+
+        [Qt] Fixes premature plugin unload bug
+        https://bugs.webkit.org/show_bug.cgi?id=66628
+        
+        Reviewed by Benjamin Poulain.
+
+        The QtPlatformPlugin was allocated on the stack, so its destructor is unloading the
+        plugin at the end of the scope. This patch moves the local creation of QtPlatformPlugin
+        to class member (TextCheckerClientQt::m_platformPlugin), preventing premature unloading
+        of plugin.            
+        
+        * WebCoreSupport/TextCheckerClientQt.cpp:
+        (WebCore::TextCheckerClientQt::loadSpellChecker):
+        * WebCoreSupport/TextCheckerClientQt.h:
+
 2011-08-17  Adam Roben  <aro...@apple.com>
 
         Make WebCore keep track of the current device scale factor

Modified: trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp (93489 => 93490)


--- trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp	2011-08-21 06:26:24 UTC (rev 93489)
+++ trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp	2011-08-21 15:53:54 UTC (rev 93490)
@@ -152,8 +152,7 @@
     if (m_spellChecker)
         return true;
 
-    QtPlatformPlugin platformPlugin;
-    if ((m_spellChecker = platformPlugin.createSpellChecker()))
+    if ((m_spellChecker = m_platformPlugin.createSpellChecker()))
         return true;
 
     return false;

Modified: trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h (93489 => 93490)


--- trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h	2011-08-21 06:26:24 UTC (rev 93489)
+++ trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h	2011-08-21 15:53:54 UTC (rev 93490)
@@ -29,6 +29,7 @@
 #ifndef TextCheckerClientQt_h
 #define TextCheckerClientQt_h
 
+#include "QtPlatformPlugin.h"
 #include "TextCheckerClient.h"
 #include "qwebkitplatformplugin.h"
 
@@ -58,6 +59,7 @@
     bool loadSpellChecker();
 
 private:
+    QtPlatformPlugin m_platformPlugin;
     OwnPtr<QWebSpellChecker> m_spellChecker;
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to