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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_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/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 319d0167e041b158244c47eeb63e4458601230d2..65e56234ff95c99d68027af4c79e95030db6da04 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1367,7 +1367,7 @@ bool TabsUpdateFunction::UpdateURL(const std::string &url_string,
ScriptExecutor::SINGLE_FRAME, ExtensionApiFrameIdMap::kTopFrameId,
ScriptExecutor::DONT_MATCH_ABOUT_BLANK, UserScript::DOCUMENT_IDLE,
ScriptExecutor::MAIN_WORLD, ScriptExecutor::DEFAULT_PROCESS, GURL(),
- GURL(), user_gesture_, ScriptExecutor::NO_RESULT,
+ GURL(), user_gesture(), ScriptExecutor::NO_RESULT,
base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this));
*is_async = true;
@@ -2163,9 +2163,10 @@ ExtensionFunction::ResponseAction TabsDiscardFunction::Run() {
// that will discard the least important tab.
if (params->tab_id) {
int tab_id = *params->tab_id;
+ std::string error;
if (!GetTabById(tab_id, profile, include_incognito(), nullptr, nullptr,
- &contents, nullptr, &error_)) {
- return RespondNow(Error(error_));
+ &contents, nullptr, &error)) {
+ return RespondNow(Error(error));
}
}
// Discard the tab.

Powered by Google App Engine
This is Rietveld 408576698