Changeset 230027 in webkit


Ignore:
Timestamp:
Mar 28, 2018 3:40:24 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r229998): WebDriver: MiniBrowser is crashing in a lot of tests after r229998
https://bugs.webkit.org/show_bug.cgi?id=184075

Reviewed by Žan Doberšek.

This is because we are using a value after it has been moved.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Save a reference to page in a local variable
before using it when it's also going to be moved in the lambda capture.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r230020 r230027  
     12018-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r229998): WebDriver: MiniBrowser is crashing in a lot of tests after r229998
     4        https://bugs.webkit.org/show_bug.cgi?id=184075
     5
     6        Reviewed by Žan Doberšek.
     7
     8        This is because we are using a value after it has been moved.
     9
     10        * UIProcess/Automation/WebAutomationSession.cpp:
     11        (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Save a reference to page in a local variable
     12        before using it when it's also going to be moved in the lambda capture.
     13
    1142018-03-27  Michael Catanzaro  <mcatanzaro@igalia.com>
    215
  • trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp

    r229998 r230027  
    359359
    360360    exitFullscreenWindowForPage(*page, [this, protectedThis = makeRef(*this), callback = WTFMove(callback), page = makeRefPtr(page), width, height, x, y]() mutable {
    361         this->restoreWindowForPage(*page, [callback = WTFMove(callback), page = WTFMove(page), width, height, x, y]() mutable {
    362             page->getWindowFrameWithCallback([callback = WTFMove(callback), page = WTFMove(page), width, height, x, y](WebCore::FloatRect originalFrame) mutable {
     361        auto& webPage = *page;
     362        this->restoreWindowForPage(webPage, [callback = WTFMove(callback), page = WTFMove(page), width, height, x, y]() mutable {
     363            auto& webPage = *page;
     364            webPage.getWindowFrameWithCallback([callback = WTFMove(callback), page = WTFMove(page), width, height, x, y](WebCore::FloatRect originalFrame) mutable {
    363365                WebCore::FloatRect newFrame = WebCore::FloatRect(WebCore::FloatPoint(x.value_or(originalFrame.location().x()), y.value_or(originalFrame.location().y())), WebCore::FloatSize(width.value_or(originalFrame.size().width()), height.value_or(originalFrame.size().height())));
    364366                if (newFrame != originalFrame)
Note: See TracChangeset for help on using the changeset viewer.