summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_function_dispatcher.cc
diff options
context:
space:
mode:
authoryoichio <yoichio@chromium.org>2015-05-07 21:03:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-08 04:05:01 +0000
commitf71a0add64e543c7bb4cf59442b77ec5f3f6978e (patch)
tree05ccaf262defc0a0186d164c515650b1795f3567 /extensions/browser/extension_function_dispatcher.cc
parentb6dc7357d62efedaefaa11fb00cfc68eda649cec (diff)
downloadchromium_src-f71a0add64e543c7bb4cf59442b77ec5f3f6978e.zip
chromium_src-f71a0add64e543c7bb4cf59442b77ec5f3f6978e.tar.gz
chromium_src-f71a0add64e543c7bb4cf59442b77ec5f3f6978e.tar.bz2
ExtensionFunctionDispatcher should use base::Process::Current() if single process
mode. Since #323179, ExtensionFunctionDispatcher has used base::Process::DeprecatedGetProcessFromHandle to callback: https://chromium.googlesource.com/chromium/src/+/f8d789c4558c7575f4d388d44730d18fdf157 72c However, base::Process::DeprecatedGetProcessFromHandle(handle) assumes |handle| is not current process handle. The assumption brakes if single process mode thus chrome can't start with the '--single-process' flag. BUG=477001 Review URL: https://codereview.chromium.org/1113343002 Cr-Commit-Position: refs/heads/master@{#328923}
Diffstat (limited to 'extensions/browser/extension_function_dispatcher.cc')
-rw-r--r--extensions/browser/extension_function_dispatcher.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/extensions/browser/extension_function_dispatcher.cc b/extensions/browser/extension_function_dispatcher.cc
index 1fa43ec..e682701 100644
--- a/extensions/browser/extension_function_dispatcher.cc
+++ b/extensions/browser/extension_function_dispatcher.cc
@@ -186,8 +186,11 @@ class ExtensionFunctionDispatcher::UIThreadResponseCallbackWrapper
const base::ListValue& results,
const std::string& error,
functions::HistogramValue histogram_value) {
- base::Process process = base::Process::DeprecatedGetProcessFromHandle(
- render_view_host_->GetProcess()->GetHandle());
+ base::Process process =
+ content::RenderProcessHost::run_renderer_in_process()
+ ? base::Process::Current()
+ : base::Process::DeprecatedGetProcessFromHandle(
+ render_view_host_->GetProcess()->GetHandle());
CommonResponseCallback(render_view_host_, render_view_host_->GetRoutingID(),
process, request_id, type, results, error,
histogram_value);