Construction of ComputedGridTrackInfo uses a method and std::move on the same variable
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: alaskanemily, Assigned: alaskanemily)
Details
Attachments
(1 file, 1 obsolete file)
This can be seen at https://searchfox.org/mozilla-central/rev/be7d1f2d52dd9474ca2df145190a817614c924e4/layout/generic/nsGridContainerFrame.cpp#7624
The order of argument evaluation is implementation-defined, so we can't trust whether the .Length() or the std::move() will get executed first.
Assignee | ||
Comment 1•6 years ago
|
||
The order of argument evaluation is implementation-defined, so we can't trust
whether the .Length() or the std::move() will get executed first.
Assignee | ||
Comment 2•6 years ago
•
|
||
I was originally wrong, since the constructor takes this argument by rvalue and so the result will be correct.
This is still a little scary because a change to the types in the constructor's argument list could make this still compile, but then depend on compiler-dependent argument evaluation order to get the correct result.
Assignee | ||
Comment 3•6 years ago
|
||
The order of argument evaluation is implementation-defined, so we can't trust
whether the .Length() or the std::move() will get executed first. This is OK
right now since the constructor takes the argument by rvalue and so it can't be
emptied out before the .Length() call. However, a change to the types in the
constructor's argument list could make this still compile, but then depend on
compiler-dependent argument evaluation order to get the correct result.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
bugherder |
Description
•