Changeset 58485 in webkit


Ignore:
Timestamp:
Apr 29, 2010 1:41:53 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] REGRESSION(r57982): tst_qwebpage::showModalDialog() crashes
https://bugs.webkit.org/show_bug.cgi?id=38314

Reviewed by Tor Arne Vestbø.

Make sure that there's always a main frame when returning from createWindow()
to the caller in WebCore.

  • WebCoreSupport/ChromeClientQt.cpp:

(WebCore::ChromeClientQt::createWindow):

Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r58463 r58485  
     12010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        Reviewed by Tor Arne Vestbø.
     4
     5        [Qt] REGRESSION(r57982): tst_qwebpage::showModalDialog() crashes
     6        https://bugs.webkit.org/show_bug.cgi?id=38314
     7
     8        Make sure that there's always a main frame when returning from createWindow()
     9        to the caller in WebCore.
     10
     11        * WebCoreSupport/ChromeClientQt.cpp:
     12        (WebCore::ChromeClientQt::createWindow):
     13
    1142010-04-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    215
  • trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r57982 r58485  
    168168        return 0;
    169169
     170    // A call to QWebPage::mainFrame() implicitly creates the main frame.
     171    // Make sure it exists, as WebCore expects it when returning from this call.
     172    QWebFrame* mainFrame = newPage->mainFrame();
     173
    170174    if (!request.isEmpty())
    171         newPage->mainFrame()->load(request.resourceRequest().url());
     175        mainFrame->load(request.resourceRequest().url());
    172176    return newPage->d->page;
    173177}
Note: See TracChangeset for help on using the changeset viewer.