Commit a0459075 authored by Andres Calderon Jaramillo's avatar Andres Calderon Jaramillo Committed by Commit Bot

Name the ScopedClosureRunner in XmlParsingDone(...).

This CL names the base::ScopedClosureRunner object in the XmlParsingDone
function. Previously, a temporary object was created, so the closure
would be called at the end of the expression. Naming the object ensures
it won't be called until the function ends.

Change-Id: I80805f85d15e75f287d169b381144c7fabbea1e7
Reviewed-on: https://chromium-review.googlesource.com/1037704Reviewed-by: default avatarJay Civelli <jcivelli@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555835}
parent 037e1f80
......@@ -73,7 +73,7 @@ class SafeXmlParserTest : public InProcessBrowserTest {
std::unique_ptr<base::Value> expected_value,
std::unique_ptr<base::Value> actual_value,
const base::Optional<std::string>& error) {
base::ScopedClosureRunner(std::move(quit_loop_closure));
base::ScopedClosureRunner runner(std::move(quit_loop_closure));
if (!expected_value) {
EXPECT_FALSE(actual_value);
EXPECT_TRUE(error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment