Simplify WaitUntilObserver::ThenFunction::Call
It was previously doing three ScriptValue copy assignment operator calls: first from ScriptPromise's promise_ to a temporary object, then to the value object, and thirdly to the function's return object. Using return value optimization, the new code only does one copy assignment: directly to the return object. It's not a big deal, but that assignment operator is non-trivial, so we might as well not call it more than necessary. Bug: none Change-Id: Idd5544b51a776ac5491c29e0ed5898484135f1ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2512884 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#822977}
Showing
Please register or sign in to comment