Commit 05425887 authored by spang's avatar spang Committed by Commit bot

Fix crash in ResolveLanguageListOnBlockingPool

Evalation order of arguments is undefined, which can result
in NULL pointers passed to ResolveLanguageListOnBlockingPool.

BUG=422002
TEST=build & run on link_freon

Review URL: https://codereview.chromium.org/641693008

Cr-Commit-Position: refs/heads/master@{#299091}
parent 478dd52b
......@@ -432,18 +432,22 @@ void ResolveUILanguageList(
scoped_ptr<std::string> new_language_list_locale(new std::string);
scoped_ptr<std::string> new_selected_language(new std::string);
content::BrowserThread::GetBlockingPool()->PostTaskAndReply(
FROM_HERE,
base::Closure resolve_on_pool =
base::Bind(&ResolveLanguageListOnBlockingPool,
base::Owned(language_switch_result.release()),
base::Unretained(new_language_list.get()),
base::Unretained(new_language_list_locale.get()),
base::Unretained(new_selected_language.get())),
base::Unretained(new_selected_language.get()));
base::Closure on_language_list_resolved =
base::Bind(&OnLanguageListResolved,
callback,
base::Passed(new_language_list.Pass()),
base::Passed(new_language_list_locale.Pass()),
base::Passed(new_selected_language.Pass())));
base::Passed(new_selected_language.Pass()));
content::BrowserThread::GetBlockingPool()->PostTaskAndReply(
FROM_HERE, resolve_on_pool, on_language_list_resolved);
}
scoped_ptr<base::ListValue> GetMinimalUILanguageList() {
......
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