Title: [247396] trunk/Source/WebKit
- Revision
- 247396
- Author
- [email protected]
- Date
- 2019-07-12 13:58:43 -0700 (Fri, 12 Jul 2019)
Log Message
WebBackForwardListItem::setPageState should receive pageState by rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=199535
Reviewed by Alex Christensen
Coverity is complaining here about copying PageState by value in the parameter list. It's
sort of a false positive, in that the PageState really does need to be copied here, so this
is the best we can do. But pass by value and then WTFMove() is a pretty strange way to write
it. Passing by rvalue reference would be better. This makes the copy more clear.
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::updateBackForwardItem):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (247395 => 247396)
--- trunk/Source/WebKit/ChangeLog 2019-07-12 20:14:05 UTC (rev 247395)
+++ trunk/Source/WebKit/ChangeLog 2019-07-12 20:58:43 UTC (rev 247396)
@@ -1,3 +1,20 @@
+2019-07-12 Michael Catanzaro <[email protected]>
+
+ WebBackForwardListItem::setPageState should receive pageState by rvalue reference
+ https://bugs.webkit.org/show_bug.cgi?id=199535
+
+ Reviewed by Alex Christensen
+
+ Coverity is complaining here about copying PageState by value in the parameter list. It's
+ sort of a false positive, in that the PageState really does need to be copied here, so this
+ is the best we can do. But pass by value and then WTFMove() is a pretty strange way to write
+ it. Passing by rvalue reference would be better. This makes the copy more clear.
+
+ * Shared/WebBackForwardListItem.h:
+ (WebKit::WebBackForwardListItem::setPageState):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::updateBackForwardItem):
+
2019-07-12 Youenn Fablet <[email protected]>
Add release logging for quota checks
Modified: trunk/Source/WebKit/Shared/WebBackForwardListItem.h (247395 => 247396)
--- trunk/Source/WebKit/Shared/WebBackForwardListItem.h 2019-07-12 20:14:05 UTC (rev 247395)
+++ trunk/Source/WebKit/Shared/WebBackForwardListItem.h 2019-07-12 20:58:43 UTC (rev 247396)
@@ -60,7 +60,7 @@
WebCore::ProcessIdentifier lastProcessIdentifier() const { return m_lastProcessIdentifier; }
void setLastProcessIdentifier(const WebCore::ProcessIdentifier& identifier) { m_lastProcessIdentifier = identifier; }
- void setPageState(PageState pageState) { m_itemState.pageState = WTFMove(pageState); }
+ void setPageState(PageState&& pageState) { m_itemState.pageState = WTFMove(pageState); }
const PageState& pageState() const { return m_itemState.pageState; }
const String& originalURL() const { return m_itemState.pageState.mainFrameState.originalURLString; }
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (247395 => 247396)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-07-12 20:14:05 UTC (rev 247395)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-07-12 20:58:43 UTC (rev 247396)
@@ -592,7 +592,7 @@
if (!item || !isAllowedToUpdateBackForwardItem(*item))
return;
- item->setPageState(itemState.pageState);
+ item->setPageState(PageState { itemState.pageState });
}
#if ENABLE(NETSCAPE_PLUGIN_API)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes