[Webkit-unassigned] [Bug 212714] Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 10 10:06:11 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=212714
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |darin at apple.com
--- Comment #19 from Darin Adler <darin at apple.com> ---
Comment on attachment 401494
--> https://bugs.webkit.org/attachment.cgi?id=401494
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=401494&action=review
> Source/WebCore/rendering/RenderWidget.cpp:60
> + auto map = WTFMove(widgetNewParentMap());
In cases like this where we *rely* in the behavior that the source ends up empty afterward, instead of just allowing move as an optimization, we should write using std::exchange instead.
auto map = std::exchange(widgetNewParentMap(), { });
The WTFMove form allows move as an optimization, but also allows the source map to have a remnant value other than empty. The std::exchange form guarantees that the source map will be empty. Both should generate nearly identical code if all the optimization is working properly.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200610/f1ed98e3/attachment.htm>
More information about the webkit-unassigned
mailing list