Changeset 61984 in webkit


Ignore:
Timestamp:
Jun 28, 2010 12:35:52 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-06-28 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Simon Hausmann.

[Qt] QGraphicsWebView crash when calling setScale() before setUrl()
https://bugs.webkit.org/show_bug.cgi?id=40000

Check 'page' before dereference in _q_scaleChanged()
Autotest included.

  • Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::_q_scaleChanged):
  • tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl):
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qgraphicswebview.cpp

    r61254 r61984  
    152152{
    153153#if ENABLE(TILED_BACKING_STORE)
     154    if (!page)
     155        return;
    154156    static_cast<PageClientQGraphicsWidget*>(page->d->client)->updateTiledBackingStoreScale();
    155157#endif
  • trunk/WebKit/qt/ChangeLog

    r61965 r61984  
     12010-06-28  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] QGraphicsWebView crash when calling setScale() before setUrl()
     6        https://bugs.webkit.org/show_bug.cgi?id=40000
     7
     8        Check 'page' before dereference in _q_scaleChanged()
     9        Autotest included.
     10
     11        * Api/qgraphicswebview.cpp:
     12        (QGraphicsWebViewPrivate::_q_scaleChanged):
     13        * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
     14        (tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl):
     15
    1162010-06-26  Simon Hausmann  <hausmann@webkit.org>
    217
  • trunk/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp

    r60958 r61984  
    3535    void microFocusCoordinates();
    3636    void focusInputTypes();
     37    void crashOnSetScaleBeforeSetUrl();
    3738};
    3839
     
    133134}
    134135
     136void tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl()
     137{
     138    QGraphicsWebView* webView = new QGraphicsWebView;
     139    webView->setScale(2.0);
     140    delete webView;
     141}
     142
    135143void tst_QGraphicsWebView::microFocusCoordinates()
    136144{
Note: See TracChangeset for help on using the changeset viewer.