Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1603)

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 2360073002: [Extensions] Isolate ExtensionFunction results_ and error_ (Closed)
Patch Set: errorwithargs Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/input_ime/input_ime_api.cc
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
index c25debb28169795639e8ff22f50e92272b12b584..8e0351ba91fd5b98b0a657b8d1a768772bb6e37a 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
@@ -318,9 +318,11 @@ ExtensionFunction::ResponseAction InputImeSetCompositionFunction::Run() {
params.selection_start ? *params.selection_start : params.cursor;
int selection_end =
params.selection_end ? *params.selection_end : params.cursor;
+ std::string error;
success = engine->SetComposition(params.context_id, params.text.c_str(),
selection_start, selection_end,
- params.cursor, segments, &error_);
+ params.cursor, segments, &error);
+ SetError(error);
}
std::unique_ptr<base::ListValue> output =
SetComposition::Results::Create(success);
@@ -337,8 +339,10 @@ ExtensionFunction::ResponseAction InputImeCommitTextFunction::Run() {
std::unique_ptr<CommitText::Params> parent_params(
CommitText::Params::Create(*args_));
const CommitText::Params::Parameters& params = parent_params->parameters;
+ std::string error;
success =
- engine->CommitText(params.context_id, params.text.c_str(), &error_);
+ engine->CommitText(params.context_id, params.text.c_str(), &error);
+ SetError(error);
}
std::unique_ptr<base::ListValue> output =
CommitText::Results::Create(success);

Powered by Google App Engine
This is Rietveld 408576698