Changeset 93490 in webkit


Ignore:
Timestamp:
Aug 21, 2011 8:53:54 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Lindsay Mathieson <lindsay.mathieson@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:
Location:
trunk/Source/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r93303 r93490  
     12011-08-21  Lindsay Mathieson  <lindsay.mathieson@gmail.com>
     2
     3        [Qt] Fixes premature plugin unload bug
     4        https://bugs.webkit.org/show_bug.cgi?id=66628
     5       
     6        Reviewed by Benjamin Poulain.
     7
     8        The QtPlatformPlugin was allocated on the stack, so its destructor is unloading the
     9        plugin at the end of the scope. This patch moves the local creation of QtPlatformPlugin
     10        to class member (TextCheckerClientQt::m_platformPlugin), preventing premature unloading
     11        of plugin.           
     12       
     13        * WebCoreSupport/TextCheckerClientQt.cpp:
     14        (WebCore::TextCheckerClientQt::loadSpellChecker):
     15        * WebCoreSupport/TextCheckerClientQt.h:
     16
    1172011-08-17  Adam Roben  <aroben@apple.com>
    218
  • trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp

    r93093 r93490  
    153153        return true;
    154154
    155     QtPlatformPlugin platformPlugin;
    156     if ((m_spellChecker = platformPlugin.createSpellChecker()))
     155    if ((m_spellChecker = m_platformPlugin.createSpellChecker()))
    157156        return true;
    158157
  • trunk/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h

    r93093 r93490  
    3030#define TextCheckerClientQt_h
    3131
     32#include "QtPlatformPlugin.h"
    3233#include "TextCheckerClient.h"
    3334#include "qwebkitplatformplugin.h"
     
    5960
    6061private:
     62    QtPlatformPlugin m_platformPlugin;
    6163    OwnPtr<QWebSpellChecker> m_spellChecker;
    6264};
Note: See TracChangeset for help on using the changeset viewer.