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

Unified Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 2360073002: [Extensions] Isolate ExtensionFunction results_ and error_ (Closed)
Patch Set: lazyboy's 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: extensions/browser/api/web_request/web_request_api.cc
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 4e41031658142b0439b2af20b01802ab4d7932fc..d4317bb307404aac2856ff5e3067f4a122e38e38 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -1979,13 +1979,13 @@ WebRequestInternalAddEventListenerFunction::Run() {
// Argument 0 is the callback, which we don't use here.
ExtensionWebRequestEventRouter::RequestFilter filter;
base::DictionaryValue* value = NULL;
- error_.clear();
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &value));
// Failure + an empty error string means a fatal error.
- EXTENSION_FUNCTION_VALIDATE(filter.InitFromValue(*value, &error_) ||
- !error_.empty());
- if (!error_.empty())
- return RespondNow(Error(error_));
+ std::string error;
+ EXTENSION_FUNCTION_VALIDATE(filter.InitFromValue(*value, &error) ||
+ !error.empty());
+ if (!error.empty())
+ return RespondNow(Error(error));
int extra_info_spec = 0;
if (HasOptionalArgument(2)) {
« no previous file with comments | « extensions/browser/api/management/management_api_delegate.h ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698