Modified: trunk/Source/WebKit/ChangeLog (230026 => 230027)
--- trunk/Source/WebKit/ChangeLog 2018-03-28 09:36:44 UTC (rev 230026)
+++ trunk/Source/WebKit/ChangeLog 2018-03-28 10:40:24 UTC (rev 230027)
@@ -1,3 +1,16 @@
+2018-03-28 Carlos Garcia Campos <cgar...@igalia.com>
+
+ 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.
+
2018-03-27 Michael Catanzaro <mcatanz...@igalia.com>
Unreviewed, fix typo in variable name
Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (230026 => 230027)
--- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2018-03-28 09:36:44 UTC (rev 230026)
+++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2018-03-28 10:40:24 UTC (rev 230027)
@@ -358,8 +358,10 @@
ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound);
exitFullscreenWindowForPage(*page, [this, protectedThis = makeRef(*this), callback = WTFMove(callback), page = makeRefPtr(page), width, height, x, y]() mutable {
- this->restoreWindowForPage(*page, [callback = WTFMove(callback), page = WTFMove(page), width, height, x, y]() mutable {
- page->getWindowFrameWithCallback([callback = WTFMove(callback), page = WTFMove(page), width, height, x, y](WebCore::FloatRect originalFrame) mutable {
+ auto& webPage = *page;
+ this->restoreWindowForPage(webPage, [callback = WTFMove(callback), page = WTFMove(page), width, height, x, y]() mutable {
+ auto& webPage = *page;
+ webPage.getWindowFrameWithCallback([callback = WTFMove(callback), page = WTFMove(page), width, height, x, y](WebCore::FloatRect originalFrame) mutable {
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())));
if (newFrame != originalFrame)
page->setWindowFrame(newFrame);