Skip to content
Commit 3ea6aa34 authored by Lei Zhang's avatar Lei Zhang Committed by Chromium LUCI CQ
Browse files

Avoid unsafe param eval in LocalPrinterHandlerChromeos::StartPrint()

The change in https://crrev.com/1146684 is potentially dangerous and can
trigger the use of a variable after it has been moved. This is because
C++ does not guarantee any particular order of evaluation. [1] Partially
undo https://crrev.com/1146684 to make it always safe again.

[1] https://en.cppreference.com/w/cpp/language/eval_order

Change-Id: Ia2c74b7d917f4d34a10d0450c72bd10ab0a509d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4548374


Commit-Queue: Lei Zhang <thestig@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: default avatarBenjamin Gordon <bmgordon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146750}
parent 40d70e15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment