Index: chrome/test/chromedriver/chrome/web_view_impl.cc |
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc |
index f49485d9691fb3eacb198a6cbe4444d2a45d00b5..7e8d1bfce8ee9ed4e5998c90feda1f4cd73509fd 100644 |
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc |
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc |
@@ -452,10 +452,11 @@ Status WebViewImpl::StopProfileInternal() { |
Status status_debug = client_->SendCommand("Debugger.disable", params); |
Status status_profiler = client_->SendCommand("Profiler.disable", params); |
- if (status_debug.IsError()) |
+ if (status_debug.IsError()) { |
return status_debug; |
- else if (status_profiler.IsError()) |
+ } else if (status_profiler.IsError()) { |
return status_profiler; |
+ } |
return Status(kOk); |
} |
@@ -479,7 +480,11 @@ Status WebViewImpl::EndProfile(scoped_ptr<base::Value>* profile_data) { |
if (status.IsError()) { |
Status disable_profile_status = StopProfileInternal(); |
- return disable_profile_status; |
+ if (disable_profile_status.IsError()) { |
+ return disable_profile_status; |
+ } else { |
+ return status; |
+ } |
} |
*profile_data = profile_result.PassAs<base::Value>(); |